22399 Commits

Author SHA1 Message Date
Yanzuo Liu
c4cc3573d1
[Clang][AST][NFC] (RecordDecl -> CXXRecordDecl)::isInjectedClassName (#148195)
Move `RecordDecl::isInjectedClassName` to
`CXXRecordDecl::isInjectedClassName`. C language doesn't have the term
"injected class name".

Co-authored-by: Matheus Izvekov <mizvekov@gmail.com>
2025-07-12 21:13:30 +08:00
Baranov Victor
f6c927e8db
[Clang] Improve diagnostics for 'placement new' with const storage argument (#144270)
Before this patch, the following code gave misleading diagnostics about
absence of `#include <new>`:
```cpp
#include <new>

struct X { int n; };
int foo() {
  const X cx = {5};
  // error: no matching 'operator new' function for non-allocating placement new expression; include <new>
  (void)new(&cx) X{10};
};
```
Now it gives correct diagnostics about constness of passed argument:
```cpp
#include <new>

struct X { int n; };
int foo() {
  const X cx = {5};
  // error: placement new expression with a const-qualified argument of type 'const X *' is not allowed
  (void)new(&cx) X{10};
};
```

Fixes https://github.com/llvm/llvm-project/issues/143708.

---------

Co-authored-by: Corentin Jabot <corentinjabot@gmail.com>
2025-07-12 09:58:06 +03:00
Finn Plummer
7ecb37b703
[HLSL][RootSignature] Retain SourceLocation of RootElement for SemaHLSL diagnostics (#147115)
At the moment, when we report diagnostics from `SemaHLSL` we only
provide the source location of the root signature attr. This allows for
significantly less helpful diagnostics (for eg. reporting resource range
overlaps).

This pr implements a way to retain the source location of a root element
when it is parsed, so that we can output the `SourceLocation` of each
root element that causes the overlap in the diagnostics during semantic
analysis.

This pr defines a wrapper struct `clang::hlsl::RootSignatureElement` in
`SemaHLSL` that will contain the underlying `RootElement` and can hold
any additional diagnostic information. This struct will be what is used
in `HLSLRootSignatureParser` and in `SemaHLSL`. Then the diagnostic
information will be stripped and the underlying element will be stored
in the `RootSignatureDecl`.

For the reporting of diagnostics, we can now use the retained
`SourceLocation` of each `RootElement` when reporting the range overlap,
and we can add a `note` diagnostic to highlight the other root element
as well.

- Defines `RootSignatureElement` in the `hlsl` namespace in `SemaHLSL`
(defined in `SemaHLSL` because `Parse` has a dependency on `Sema`)
- Updates parsing logic to construct `RootSignatureElement`s and retain
the source loction in `ParseHLSLRootSignature`
- Updates `SemaHLSL` when it constructs the `RootSignatureDecl` to take
the new `RootSignatureElement` and store the underlying `RootElement`
- Updates the current tests to ensure the new `note` diagnostic is
produced and that the `SourceLocation` is seen
- Slight update to the `RootSignatureValidations` api to ensure the
caller sorts and owns the memory of the passed in `RangeInfo`
- Adds a test to demonstrate the `SourceLocation` of both elements being
correctly pointed out

Resolves: https://github.com/llvm/llvm-project/issues/145819
2025-07-11 18:33:16 -07:00
Ashley Coleman
4ce34f1738
[HLSL] Disallow writing to readonly resources (#147806)
Fixes #141842 

Only add the non-const subscript operator to write resources
2025-07-11 16:30:10 -06:00
Aaron Ballman
ea65415f31 Remove some FIXMEs that no longer apply; NFC
Noticed these while doing a review on changes in the area, but C23
added support for nodiscard with a message, so it's not an extension
we need to diagnose.
2025-07-11 07:41:51 -04:00
Aaron Ballman
a2246eebca
[C23] Accept an _Atomic underlying type (#147802)
The underlying type of an enumeration is the non-atomic, unqualified
version of the specified type. Clang was rejecting such enumerations,
with a hard error, but now has the ability to downgrade the error into a
warning. Additionally, we diagnose (as a warning) dropping other
qualifiers. _Atomic is special given that an atomic type need not have
the same size as its non-atomic counterpart, and that the C++ version
of <stdatomic.h> defines _Atomic to std::atomic for easing cross-
language atomic use and std::atomic is an invalid enum base in C++.
(Note: we expose _Atomic in C++ even without including
<stdatomic,h>.)

Fixes #147736
2025-07-11 07:28:03 -04:00
Robert Imschweiler
77861b3a8f
[OpenMP][clang] 6.0: parsing/sema for message/severity for parallel (#146093)
Implement parsing and semantic analysis support for the message and
severity clauses that have been added to the parallel directive in
OpenMP 6.0, 12.1.
2025-07-11 11:22:06 +02:00
offsetof
e0eb8f0ef3
[clang] Fix static_cast bypassing access control (#132285)
Fix access and ambiguity checks not being performed when converting to
an rvalue reference to a base class type with `static_cast`.

Fixes #121429

---------

Co-authored-by: Corentin Jabot <corentinjabot@gmail.com>
2025-07-11 08:11:40 +02:00
Igor Kudrin
f0befb0dcd
[clang] Combine ConstRefUse with other warnings for uninitialized values (#147898)
This helps to avoid duplicating warnings in cases like:
```
> cat test.cpp
void bar(int);
void foo(const int &);
void test(bool a) {
  int v = v;
  if (a)
    bar(v);
  else
    foo(v);
}
> clang++.exe test.cpp -fsyntax-only -Wuninitialized
test.cpp:4:11: warning: variable 'v' is uninitialized when used within its own initialization [-Wuninitialized]
    4 |   int v = v;
      |       ~   ^
test.cpp:4:11: warning: variable 'v' is uninitialized when used within its own initialization [-Wuninitialized]
    4 |   int v = v;
      |       ~   ^
2 warnings generated.
```
2025-07-10 18:24:19 -07:00
Oliver Hunt
34a1daae83
[Clang] Mark a concept as being invalid if the constraint is invalid (#147938)
Make sure to mark a concept decl as being invalid if the constraint is
invalid.


Fixes #138823
2025-07-10 17:33:03 -07:00
Utkarsh Saxena
3076794e92
[LifetimeSafety] Introduce intra-procedural analysis in Clang (#142313)
This patch introduces the initial implementation of the
intra-procedural, flow-sensitive lifetime analysis for Clang, as
proposed in the recent RFC:
https://discourse.llvm.org/t/rfc-intra-procedural-lifetime-analysis-in-clang/86291

The primary goal of this initial submission is to establish the core
dataflow framework and gather feedback on the overall design, fact
representation, and testing strategy. The focus is on the dataflow
mechanism itself rather than exhaustively covering all C++ AST edge
cases, which will be addressed in subsequent patches.

#### Key Components

* **Conceptual Model:** Introduces the fundamental concepts of `Loan`,
`Origin`, and `Path` to model memory borrows and the lifetime of
pointers.
* **Fact Generation:** A frontend pass traverses the Clang CFG to
generate a representation of lifetime-relevant events, such as pointer
assignments, taking an address, and variables going out of scope.
* **Testing:** `llvm-lit` tests validate the analysis by checking the
generated facts.


### Next Steps
*(Not covered in this PR but planned for subsequent patches)*

The following functionality is planned for the upcoming patches to build
upon this foundation and make the analysis usable in practice:

* **Dataflow Lattice:** A dataflow lattice used to map each pointer's
symbolic `Origin` to the set of `Loans` it may contain at any given
program point.
* **Fixed-Point Analysis:** A worklist-based, flow-sensitive analysis
that propagates the lattice state across the CFG to a fixed point.
* **Placeholder Loans:** Introduce placeholder loans to represent the
lifetimes of function parameters, forming the basis for analysis
involving function calls.
* **Annotation and Opaque Call Handling:** Use placeholder loans to
correctly model **function calls**, both by respecting
`[[clang::lifetimebound]]` annotations and by conservatively handling
opaque/un-annotated functions.
* **Error Reporting:** Implement the final analysis phase that consumes
the dataflow results to generate user-facing diagnostics. This will
likely require liveness analysis to identify live origins holding
expired loans.
* **Strict vs. Permissive Modes:** Add the logic to support both
high-confidence (permissive) and more comprehensive (strict) warning
levels.
* **Expanded C++ Coverage:** Broaden support for common patterns,
including the lifetimes of temporary objects and pointers within
aggregate types (structs/containers).
* Performance benchmarking
* Capping number of iterations or number of times a CFGBlock is
processed.

---------

Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com>
2025-07-10 23:42:20 +02:00
Artem Chikin
a7091951f0
[APINotes] Add support for capturing all possible versioned APINotes without applying them
Swift-versioned API notes get applied at PCM constrution time relying on
'-fapinotes-swift-version=X' argument to pick the appropriate version.
This change adds a new APINotes application mode with
'-fswift-version-independent-apinotes' which causes *all* versioned API
notes to get recorded into the PCM wrapped in 'SwiftVersionedAttr'
instances. The expectation in this mode is that the Swift client will
perform the required transformations as per the API notes on the client
side, when loading the PCM, instead of them getting applied on the
producer side. This will allow the same PCM to be usable by Swift
clients building with different language versions.

In addition to versioned-wrapping the various existing API notes
annotations which are carried in declaration attributes, this change
adds a new attribute for two annotations which were previously applied
directly to the declaration at the PCM producer side: 1) Type and 2)
Nullability annotations with 'SwiftTypeAttr' and 'SwiftNullabilityAttr',
respectively. The logic to apply these two annotations to a declaration
is refactored into API.
2025-07-10 19:19:18 +01:00
Corentin Jabot
ab0d11c815
[Clang] Fix a crash when diagnosing wrong conversion to explicit object parameter (#147996)
When an overload is invalid, we try to initialize each conversion
sequence for the purpose of diagmostics, but we failed to initialize
explicit objects, leading to a crash

Fixes #147121
2025-07-10 19:28:47 +02:00
Oleksandr T.
9ef0a886e6
[Clang] fixed false positive redeclaration error for using enum in nested scopes (#147711)
Fixes #147495 

--- 

This patch addresses the issue of false-positive redeclaration errors
that occur for `using enum` declarations in nested class scopes

```cpp
struct S {
  enum class E { A };
  using enum E;

  struct S1 {
    using enum E; // no error
  };
};
```
2025-07-10 18:13:44 +03:00
Corentin Jabot
39ea9b71d9
[Clang] Correctly handle taking the address of an explicit object member function template (#147046)
When implementing #93430, I failed to consider some cases involving
function templates.

```
struct A {
    template <typename T>
    void a(this T self);
};
(&A::a<A>)(A{});
```

This fixes that
2025-07-10 14:05:23 +02:00
Younan Zhang
adcd1bb32a
[Clang] Fix the template argument collection after CWG2369 (#147894)
Since the function template isn't instantiated before constraint
checking, we'll not be able to find the outer template arguments through
function specialization when evaluating the inner constraint that is
nested within a larger constraint expression.

The only practical solution is to get them back through the code
synthesis context, which also allows us to eliminate an overload of
getTemplateInstantiationArgs.

No release note because it's a regression on trunk.

Fixes https://github.com/llvm/llvm-project/issues/147772
2025-07-10 16:17:34 +08:00
Marco Vitale
c86c815fc5
[Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (#145164)
C++23 mandates that temporaries used in range-based for loops are
lifetime-extended
to cover the full loop. This patch adds a check for loop variables and
compiler-
generated `__range` bindings to apply the correct extension.

Includes test cases based on examples from CWG900/P2644R1.

Fixes https://github.com/llvm/llvm-project/issues/109793
2025-07-10 09:57:07 +08:00
Alex Sepkowski
7c16a31aa5
Address a handful of C4146 compiler warnings where literals can be replaced with std::numeric_limits (#147623)
This PR addresses instances of compiler warning C4146 that can be
replaced with std::numeric_limits. Specifically, these are cases where a
literal such as '-1ULL' was used to assign a value to a uint64_t
variable. The intent is much cleaner if we use the appropriate
std::numeric_limits value<Type>::max() for these cases.


Addresses #147439
2025-07-09 16:13:28 -07:00
Corentin Jabot
6d00c4297f
[Clang] Do not skip over RequiresExprBodyDecl when creating lambdas (#147764)
When we create a lambda, we would skip over declaration contexts
representing a require expression body, which would lead to wrong
lookup.

Note that I wasn't able to establish why the code
in `Sema::createLambdaClosureType` was there to begin with (it's not
exactly recent)

The changes to mangling only ensure the status quo is preserved and do
not attempt to address the known issues of
mangling lambdas in require clauses.

In particular the itanium mangling is consistent with Clang before this
patch but differs from GCC's.

Fixes #147650
2025-07-10 00:21:09 +03:00
higher-performance
56679a8414
Include [[clang::require_explicit_initialization]] warnings in system headers (#141133)
Fixes #141103
2025-07-09 12:02:59 -04:00
Finn Plummer
aa1829df02
[NFC][HLSL] Move resource range logic from SemaHLSL to RootSignatureValidations (#147117)
This pr abstracts out the logic of detecting resource range overlap from
`SemaHLSL` into the `RootSignatureValidations` library.

For more context see linked issue.

- Moves the validation logic from `SemaHLSL` to
`RootSignatureValidations`
- Updates `SemaHLSL` to use the new interface for the validations

Resolves: https://github.com/llvm/llvm-project/issues/146393
2025-07-08 18:13:36 -07:00
Eli Friedman
6a993264ee
[clang] Consistently handle consteval constructors for variables. (#144970)
443377a9d1a8d4a69a317a1a892184c59dd0aec6 handled simple variable
definitions, but it didn't handle uninitialized variables with a
consteval constructor, and it didn't handle template instantiation.

Fixes #135281 .
2025-07-08 14:47:04 -07:00
Kazu Hirata
d0c1f148ce
[Sema] Remove an unnecessary cast (NFC) (#147546)
D is already of CXXMethodDecl *.
2025-07-08 12:47:03 -07:00
Corentin Jabot
e29ac9bc2e
[Clang] Do not mark ambiguous specialization invalid. (#147275)
When a specialization was ambiguous, we would mark it as invalid, even
if the specialization occured in an immediate context.

This would subsequently lead to scenarios where invalid specialization
produced no diagnostics, causing crashes during codegen.

Fixes #51866
2025-07-08 17:41:11 +02:00
Paul Walker
e4d00683c3
[Clang][SME] Refactor checkArmStreamingBuiltin. (#145941)
Rather than filtering the calling function's features the PR splits the
builtin guard into distinct non-streaming and streaming guards that are
compared to the active features in full.
2025-07-08 13:55:22 +01:00
Younan Zhang
e55b1949c5
[Clang] Fix template arguments collection for out-of-line declarations (#147463)
We were using the lexical DC as the starting point of template argument
collection when comparing declarations. This caused an issue that
template arguments from out-of-line declarations are ignored when
substituting into the constraints, which in turn led to expression
mismatching.

Fixes https://github.com/llvm/llvm-project/issues/145521
2025-07-08 19:01:01 +08:00
Shamshura Egor
e476f968bc
[libc++][Clang] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (#144220)
Added explanation why a is constructible evaluated to false. Also fixed
problem with ExtractTypeTraitFromExpression. In case std::is_xxx_v<>
with variadic pack it tries to get template argument, but fails in
expression Arg.getAsType() due to Arg.getKind() ==
TemplateArgument::ArgKind::Pack, but not
TemplateArgument::ArgKind::Type.
Reverts #144127
Fixies
https://github.com/llvm/llvm-project/pull/143309#issuecomment-2970012054
2025-07-08 12:58:34 +02:00
Oleksandr T.
2e8e254d18
[Clang] include attribute scope in diagnostics (#144619)
This patch updates diagnostics to print fully qualified attribute names,
including scope when present.
2025-07-08 11:36:52 +03:00
Kazu Hirata
9d8a1bec2b
[Sema] Remove an unnecessary cast (NFC) (#147203)
StorageClass is already of spirv::StorageClass.
2025-07-06 21:06:33 -07:00
Kazu Hirata
430c0376c8
[Sema] Remove an unnecessary cast (NFC) (#147154)
BitWidth is already of Expr *.
2025-07-05 10:44:52 -07:00
Nathan Ridge
e64289baa0
[clang][Sema] Unify getPrototypeLoc helpers in SemaCodeComplete and clangd (#143345)
HeuristicResolver houses the unified implementation.

Fixes https://github.com/llvm/llvm-project/issues/143240
2025-07-05 10:59:16 -04:00
Yanzuo Liu
3d6f4fb5f7
[Clang][Sema] Do not perform error recovery for invalid member using-declaration in C++20+ mode (#147003)
Previously, Clang tried to perform error recovery for invalid member
using-declaration whose nested-name-specifier refers to its own class in
C++20+ mode, which causes crash.

```cpp
template <typename...> struct V {};
struct S : V<> {
  using S::V; // error recovery here
  V<> v; // crash
};
```

This PR disables the error recovery to fix the crash.

Fixes #63254
2025-07-05 14:30:28 +08:00
Finn Plummer
56e3fc4c42
[NFC][HLSL][RootSignature] Split up HLSLRootSignatureUtils (#146124)
This pr breaks-up `HLSLRootSignatureUtils` into separate orthogonal and
meaningful libraries. This prevents it ending up as a dumping grounds of
many different parts.

- Creates a library `RootSignatureMetadata` to contain helper functions
for interacting the root signatures in their metadata representation
- Create a library `RootSignatureValidations` to contain helper
functions that will validate various values of root signatures
- Move the serialization of root signature elements to
`HLSLRootSignature`

Resolves: https://github.com/llvm/llvm-project/issues/145946
2025-07-04 07:58:58 -07:00
Kazu Hirata
a465e35908
[Sema] Remove an unnecessary cast (NFC) (#146985)
Decl is already of FunctionDecl *.
2025-07-04 07:56:28 -07:00
Corentin Jabot
af2bb8f826
[Clang] Correctly handle allocations in the condition of a if constexpr (#146890)
Deal with the following scenario

```cpp
struct S {
    char* c = new char;
    constexpr ~S() {
        delete c;
    }
};
if constexpr((S{}, true)){};
```

There were two issues
- We need to produce a full expression _before_ evaluating the condition
(otherwise, automatic variables are never destroyed)
- We need to preserve the evaluation context of the condition while
doing the semantics analysis for it (lest it is evaluated in a
non-constant-evaluated context)

Fixes #120197
Fixes #134820
2025-07-04 16:40:29 +03:00
Jim Lin
61529d9e36
[RISCV] Remove implied extension Zvfhmin for XAndesVPackFPH (#146861)
XAndesVPackFPH can actually be used independently without requiring
Zvfhmin. Therefore, we remove the implicitly required Zvfhmin extension
from XAndesVPackFPH and imply that the f extension is sufficient.
2025-07-04 10:16:20 +08:00
Henrik G. Olsson
2910c24638
[Modules] Record side effect info in EvaluatedStmt (#146468)
All deserialized VarDecl initializers are EvaluatedStmt, but not all
EvaluatedStmt initializers are from a PCH. Calling
`VarDecl::hasInitWithSideEffects` can trigger constant evaluation, but
it's hard to know ahead of time whether that will trigger
deserialization - even if the initializer is fully deserialized, it may
contain a call to a constructor whose body is not deserialized. By
caching the result of `VarDecl::hasInitWithSideEffects` and populating
that cache during deserialization we can guarantee that calling it won't
trigger deserialization regardless of the state of the initializer.
This also reduces memory usage by removing the `InitSideEffectVars` set
in `ASTReader`.

rdar://154717930
2025-07-03 15:37:55 -07:00
Finn Plummer
0ceb0c377a
[NFC][HLSL][DirectX] Let HLSLRootSignature reuse the dxbc defined enums (#145986)
This pr removes the redundancy of having the same enums defined in both
the front-end and back-end of handling root signatures. Since there are
many more uses of the enum in the front-end of the code, we will adhere
to the naming conventions used in the front-end, to minimize the diff.

The macros in `DXContainerConstants.def` are also touched-up to be
consistent and to have each macro name follow its respective definition
in d3d12.h and searchable by name
[here](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/).

Additionally, the many `getEnumNames` are moved to `DXContainer` from
`HLSLRootSignatureUtils` as they we will want them to be exposed
publicly anyways.

Changes for each enum follow the pattern of a commit that will make the
enum definition in `DXContainer` adhere to above listed naming
conventions, followed by a commit to actually use that enum in the
front-end.

Resolves https://github.com/llvm/llvm-project/issues/145815
2025-07-03 14:44:11 -07:00
Eli Friedman
2aa0f0a3bd
[AArch64] Add option -msve-streaming-vector-bits= . (#144611)
This is similar to -msve-vector-bits, but for streaming mode: it
constrains the legal values of "vscale", allowing optimizations based on
that constraint.

This also fixes conversions between SVE vectors and fixed-width vectors
in streaming functions with -msve-vector-bits and
-msve-streaming-vector-bits.

This rejects any use of arm_sve_vector_bits types in streaming
functions; if it becomes relevant, we could add
arm_sve_streaming_vector_bits types in the future.

This doesn't touch the __ARM_FEATURE_SVE_BITS define.
2025-07-03 13:44:38 -07:00
Corentin Jabot
994501abe7
[Clang] Fix evaluation context of lambdas appearing in discarded statements (#146857)
Fixes 2 bugs reported in #146063

- The body of a lambda appearing in a discarded statement was sometimes
considered discarded itself
- A lambda conversion operator that was not odr-used was sometimes not
defined even if it was needed

Fixes #146063

---------

Co-authored-by: Timm Baeder <tbaeder@redhat.com>
2025-07-03 20:59:18 +03:00
Kazu Hirata
5df748dd32
[Sema] Remove an unnecessary cast (NFC) (#146808)
The only use of BW is to initialize BitWidth.  This patch renames BW
to BitWdith while removing the cast statement.
2025-07-03 08:35:55 -07:00
erichkeane
438863a09e [OpenACC][Sema] Implement warning for 'cache' invalid var ref
The 'cache' construct is lowered as marking the acc.loop in ACC MLIR.
This results in any variable references that are not inside of the
acc.loop being invalid.  This patch adds a warning to that effect, and
ensures that the variable references won't be added to the AST during
parsing so we don't try to lower them.

This results in loss of instantiation-diagnostics for these, however
that seems like an acceptable consequence to ignoring it.
2025-07-03 07:13:30 -07:00
Ashwin Kishin Banwari
cc801b6570
[clang] [modules] Add err_main_in_named_module (#146635)
Revival of https://github.com/llvm/llvm-project/pull/146247 which got
reverted for broken test.

Now that https://github.com/llvm/llvm-project/pull/146461 is merged to
allow `extern "C++"` for main, we can merge this change.
2025-07-03 10:03:43 +08:00
Kazu Hirata
5e6e51bbbe
[Sema] Remove an unnecessary cast (NFC) (#146703)
The only use of Receiver is to initialize RecExpr.  This patch renames
Receiver to RecExpr while removing the cast statement.
2025-07-02 10:39:33 -07:00
Adam Glass
ed27f18e32
__sys builtin support for AArch64 (#146456)
Adds support for __sys Clang builtin for AArch64

__sys is a long existing MSVC intrinsic used to manage caches, tlbs, etc
by writing to system registers:
* It takes a macro-generated constant and uses it to form the AArch64 SYS instruction which is MSR with op0=1. The macro drops op0 and expects the implementation to hardcode it to 1 in the encoding.
* Volume use is in systems code (kernels, hypervisors, boot environments, firmware)
* Has an unused return value due to MSVC cut/paste error

Implementation:
* Clang builtin, sharing code with Read/WriteStatusReg
* Hardcodes the op0=1
* Explicitly returns 0
* Code-format change from clang-format
* Unittests included
* Not limited to MSVC-environment as its generally useful and neutral
2025-07-02 10:17:01 -07:00
Juan Manuel Martinez Caamaño
03919ef8d9
[Clang][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (#143507)
cl_amd_media_ops/cl_amd_media_ops2 builtins are currently not declared
with -fdeclare-opencl-builtins.

This patch adds support for these builtins.
2025-07-02 16:55:24 +02:00
Kazu Hirata
7b4dbb4f37
[Sema] Remove an unnecessary cast (NFC) (#146622)
Since both alignment and Alignment are of the same type, this patch
renames alignment to Alignment while removing the cast statement.
2025-07-01 22:49:48 -07:00
Ashwin Banwari
2599a9aeb5
[clang] [modules] Implement P3618R0: Allow attaching main to the global module (#146461)
Remove the prior warning for attaching extern "C++" to main.
2025-07-02 09:52:10 +08:00
Mythreya
d9d9ab8698
[clang][CodeComplete] skip explicit obj param in code completion string (#146258)
Fixes clangd/clangd#2339
2025-07-01 08:33:56 -04:00
Baranov Victor
96b9b2e21d
[Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (#144274)
If field width is specified, the sign/space is already accounted for
within the field width, so no additional size is needed.

Fixes https://github.com/llvm/llvm-project/issues/143951.

---------

Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
2025-06-30 22:43:47 +03:00