Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
The usage of the taint analysis is described through a command injection attack example.
It is explained how to make a variable sanitized through configuration.
Differential Revision: https://reviews.llvm.org/D145229
|
|
Differential Revision: https://reviews.llvm.org/D156195
|
|
Reviewed By: pengfei, RKSimon, skan
Differential Revision: https://reviews.llvm.org/D155798
|
|
This patch updates the Clang release notes with the new option
-fkeep-persistent-storage-variables added in bb6ab91b1dcd.
Reviewed By: hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D155501
|
|
This is a refactoring of:
- SpacesInConditionalStatement
- SpacesInCStyleCastParentheses
- SpaceInEmptyParentheses
- SpacesInParentheses
These are now options under the new Style Option: SpacesInParens. The
existing options are maintained for backward compatibility.
Within SpacesInParens, there are currently options for:
- Never
- Custom
The currently available options for Custom are:
- InConditionalStatements
- InCStyleCasts
- InEmptyParentheses
- Other
Setting InConditionalStatements and Other to true enables the same space
additions as SpacesInParentheses.
This refactoring does not add or remove any existing features, but it makes
it possible to more easily extend and maintain the addition of spaces within
parentheses.
Related to #55428.
Differential Revision: https://reviews.llvm.org/D155239
|
|
This adds a new AlignConsecutiveShortCaseStatements option in line with the
existing AlignConsecutive* options , which when
AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the
case statement's colon. This also adds a AlignCaseColons option to allow
aligning the case label colon itself rather than the token after it.
Fixes #55475.
Differential Revision: https://reviews.llvm.org/D151761
|
|
This reverts commit 4ba00844174db562d2bd8b15dab6aac605eddf57.
|
|
This reverts commit 4f093b31669a4f8e417259583141159586a05b28.
|
|
This reverts commit 4ba00844174db562d2bd8b15dab6aac605eddf57 due to missing
authorship.
|
|
GCC behaviour"
This reverts commit c299efbf284fae92bb8d7d29110f76912f089daf.
Reason to revert: D142327 has been reverted which is depended by this
change.
|
|
This adds a new AlignConsecutiveShortCaseStatements option in line with the
existing AlignConsecutive* options , which when
AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the
case statement's colon. This also adds a AlignCaseColons option to allow
aligning the case label colon itself rather than the token after it.
Fixes #55475.
Differential Revision: https://reviews.llvm.org/D151761
|
|
behaviour
GCC doesn't ignore non-zero-length array of empty structures in C++
while clang does. What this patch did is to match GCC's behaviour
although this rule is not documented in psABI.
Similar to D142327 for RISCV.
Reviewed By: xry111, xen0n
Differential Revision: https://reviews.llvm.org/D156116
|
|
Add codegen for llvm pow elementwise builtin
The pow elementwise builtin is necessary for HLSL codegen.
Tests were added to make sure that the expected errors are encountered when these functions are given inputs of incompatible types, or too many inputs.
The new builtin is restricted to floating point types only.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D153310
|
|
Fixes #64041
Differential Revision: https://reviews.llvm.org/D156063
|
|
Explicit specialization doesn't increase depth of template parameters,
so need to be careful when gathering template parameters for
instantiation.
For the case:
```
template<typename T>
struct X {
struct impl;
};
template <>
struct X<int>::impl {
template<int ct>
int f() { return ct; };
};
```
instantiation of `f` used to crash because type template parameter
`int` of explicit specialization was taken into account, but non-type
template parameter `ct` had zero depth and index so wrong parameter
ended up inside of a wrong handler.
Fixes https://github.com/llvm/llvm-project/issues/61159
Reviewed By: aaron.ballman, shafik
Differential Revision: https://reviews.llvm.org/D155705
|
|
calling conventions in C++"
This reverts commit 17a58b3ca7ec18585e9ea8ed8b39d72fe36fb6cb and the
minor documentation fix 569e99a471f618b7fdf045d5e96f21d3e3a7f898.
An issue was reported in https://reviews.llvm.org/D142327#inline-1510301
so reverting until it can be investigated and fixed.
|
|
This addresses issues found by:
https://lab.llvm.org/buildbot/#/builders/92/builds/47783
|
|
|
|
ParmVarDecl of BlockDecl is unnecessarily dumped twice.
Remove this duplication as other FunctionDecls.
Fixes https://github.com/llvm/llvm-project/issues/64005 (#2)
Differential Revision: https://reviews.llvm.org/D155985
|
|
BlockDecl should be invalidated because of its invalid ParmVarDecl.
Fixes #1 of https://github.com/llvm/llvm-project/issues/64005
Differential Revision: https://reviews.llvm.org/D155984
|
|
BlockExpr
Invalidate BlockDecl with implicit return type, in case any of the return value exprs is invalid.
Propagating the error info up by replacing BlockExpr with a RecoveryExpr.
The idea of this fix is given by @hokein(Haojian Wu)
Fix https://github.com/llvm/llvm-project/issues/63863.
Differential Revision: https://reviews.llvm.org/D155396
|
|
I believe my previous patch, 17a58b3ca7ec18585e9ea8ed8b39d72fe36fb6cb
introduced a warning here.
|
|
conventions in C++
As reported in <https://github.com/llvm/llvm-project/issues/58929>,
Clang's handling of empty structs in the case of small structs that may
be eligible to be passed using the hard FP calling convention doesn't
match g++. In general, C++ record fields are never empty unless
[[no_unique_address]] is used, but the RISC-V FP ABI overrides this.
After this patch, fields of structs that contain empty records will be
ignored, even in C++, when considering eligibility for the FP calling
convention ('flattening'). See also the relevant psABI issue
<https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/358> which
seeks to clarify the documentation.
Fixes https://github.com/llvm/llvm-project/issues/58929
Differential Revision: https://reviews.llvm.org/D142327
|
|
We'll soon branch off, and start releasing clang-17.
Here is a patch, adjusting the release notes for what we achieved since
the last release.
I used this command to inspect the interesting commits:
```
git log --oneline llvmorg-16.0.0..llvm/main \
clang/{lib/StaticAnalyzer,include/clang/StaticAnalyzer} | \
grep -v NFC | grep -v -i revert
```
This filters in CSA directories and filters out NFC and revert commits.
Given that in the release-notes, we usually don't put links to commits,
I'll remove them from this patch as well. I just put them there to make
it easier to review for you.
I tried to group the changes into meaningful chunks, and dropped some of
the uninteresting commits.
I've also dropped the commits that were backported to clang-16.
Check out how it looks, and propose changes like usual.
---
FYI the `ninja docs-clang-html` produces the html docs, including the `ReleaseNotes`.
And the produced artifact will be at `build/tools/clang/docs/html/ReleaseNotes.html`.
Differential Revision: https://reviews.llvm.org/D155445
|
|
|
|
https://godbolt.org/z/cMKE3o1aG
According to the issue https://github.com/llvm/llvm-project/issues/63960 , compiler falsely complains that no viable `operator<=>` was found while we are actually looking for a `operator==`.
This bug has been fixed through adding a check of the `OverloadedOperatorKind` type's object, `OO`, to see if it is `OO_EqualEqual` in addition to `OO_ExclaimEqual`.
Reviewed By: #clang-language-wg, cor3ntin
Differential Revision: https://reviews.llvm.org/D155714
|
|
This also ignores and deprecates the `-fdouble-square-bracket-attributes` command line flag, which seems to not be used anywhere. At least a code search exclusively found mentions of it in documentation: https://sourcegraph.com/search?q=context:global+-fdouble-square-bracket-attributes+-file:clang/*+-file:test/Sema/*+-file:test/Parser/*+-file:test/AST/*+-file:test/Preprocessor/*+-file:test/Misc/*+archived:yes&patternType=standard&sm=0&groupBy=repo
RFC: https://discourse.llvm.org/t/rfc-enable-c-11-c2x-attributes-in-all-standard-modes-as-an-extension-and-remove-fdouble-square-bracket-attributes
This enables `[[]]` attributes in all C and C++ language modes without warning by default. `-Wc++-extensions` does warn. GCC has enabled this extension in all C modes since GCC 10.
Reviewed By: aaron.ballman, MaskRay
Spies: #clang-vendors, beanz, JDevlieghere, Michael137, MaskRay, sstefan1, jplehr, cfe-commits, lldb-commits, dmgreen, jdoerfert, wenlei, wlei
Differential Revision: https://reviews.llvm.org/D151683
|
|
Such jumps are not allowed by GCC and allowing them
can lead to situations where we jumps into unevaluated
statements.
Fixes #63682
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D154696
|
|
A lambda call operator can be a templated entity -
and therefore have constraints while not being a function template
template<class T> void f() {
[]() requires false { }();
}
In that case, we would check the constraints of the call operator
which is non-viable. However, we would find a viable candidate:
the conversion operator to function pointer, and use it to
perform a surrogate call.
These constraints were not checked because:
* We never check the constraints of surrogate functions
* The lambda conversion operator has non constraints.
From the wording, it is not clear what the intent is but
it seems reasonable to expect the constraints of the lambda conversion
operator to be checked and it is consistent with GCC and MSVC.
This patch also improve the diagnostics for constraint failure
on surrogate calls.
Fixes #63181
Reviewed By: #clang-language-wg, aaron.ballman
Differential Revision: https://reviews.llvm.org/D154368
|
|
The current behavior of JumpScopeChecker::VerifyIndirectOrAsmJumps was
to cross validate the scope of every jumping statement (goto, asm goto)
against the scope of every label (even if the label was not even a
possible target of the asm goto).
When we have multiple asm goto's with unique targets, we could trigger
false positive build errors complaining that labels that weren't even in
the asm goto's label list could not be jumped to. Example:
error: cannot jump from this asm goto statement to one of its possible targets
asm goto(""::::foo);
note: possible target of asm goto statement
bar:
^
Fixes: https://github.com/ClangBuiltLinux/linux/issues/1886
Reviewed By: void, jyu2, rjmccall
Differential Revision: https://reviews.llvm.org/D155342
|
|
Closes #63934
Differential Revision: https://reviews.llvm.org/D155549
|
|
Differential Revision: https://reviews.llvm.org/D150386
|
|
Reland after fixing regression in lldb.
Differential Revision: https://reviews.llvm.org/D155539
|
|
This reverts commit 2d1d07152bd26b001dedec3400b4b01d3bb11622.
|
|
Reviewed By: #clang-language-wg, aaron.ballman
Differential Revision: https://reviews.llvm.org/D154290
|
|
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
Reviewed By: pengfei, skan
Differential Revision: https://reviews.llvm.org/D155145
|
|
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
Reviewed By: pengfei, skan
Differential Revision: https://reviews.llvm.org/D155148
|
|
Currently CUDA/HIP defines their own language standards in
LanguageStandards.def but they are redundant. They are the same as stdc++14.
The fact that CUDA/HIP uses c++* in option -std= indicates that they have the
same language standards as C++. The CUDA/HIP specific language features are
conveyed through language options, not language standards features. It makes
sense to let CUDA/HIP uses the same default language standard as C++.
Reviewed by: Siu Chi Chan, Artem Belevich
Differential Revision: https://reviews.llvm.org/D155539
Fixes: SWDEV-407685
|
|
For more details about these instructions, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
Reviewed By: pengfei
Differential Revision: https://reviews.llvm.org/D155147
|
|
For more details about this instruction, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html
Reviewed By: RKSimon, skan
Differential Revision: https://reviews.llvm.org/D155146
|
|
This patch adds some information that we have support for in the OpenMP
clang support page.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D155727
|
|
|
|
|
|
It is a known problem that the compiler isn't efficiency when there are
a lot of duplications in the modules to developers. But it may not be
verbose to the (potential) new users of C++20 modules.
It may be necessary to mention this in the document.
|
|
Default member initializations constructed from
a parenthesized aggregate initialization should be constructed
at the location of the left paren, to be consistent with
brace initialization.
Otherwise we get diagmostics and source_location in the wrong places.
Fixes #63903
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D155573
|
|
Given LLVM17 is going to be branched, add some uncovered C++20 modules related changes
to the Release Notes.
|
|
Note"
This reverts commit 95bdd6eed6f3f4b8a95523516120068ac18eccff. The bot
shows there are some grammar issues.
|
|
Given LLVM17 is going to be branched, add some uncovered C++20 modules related changes
to the Release Notes.
|
|
|