Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
3f957cc
Bump version to 20.1.2 (#132293)
tstellar Mar 21, 2025
9710e99
[X86][AVX10.2] Include changes for COMX and VGETEXP from rev. 2 (#132…
e-kud Mar 25, 2025
66825a8
[LLD] [COFF] Add a few more mingw libs to skip autoexports for (#132289)
mstorsjo Mar 21, 2025
fcd0ad2
[AArch64] Add test for scalar copysign. NFC
davemgreen Mar 4, 2025
dc7b743
[AArch64] Fix SVE scalar fcopysign lowering without neon. (#129787)
davemgreen Mar 5, 2025
0383020
[llvm] Fix crash when complex deinterleaving operates on an unrolled …
NickGuy-Arm Mar 19, 2025
2198410
[compiler-rt][Darwin][x86] Fix instrprof-darwin-exports test (#131425)
dtellenbach Mar 18, 2025
e0e8071
[hexagon] Prevent alignment search beyond a label (#130631)
quic-akaryaki Mar 11, 2025
9576365
[HEXAGON] Add support to lower "FREEZE a half(f16)" instruction on He…
quic-asaravan Mar 12, 2025
6034661
[LoongArch] Pre-commit test for fixing tls-le symbol type
zhaoqi5 Mar 21, 2025
a311bc8
[llvm-dlltool] Implement the --identify option (#127465)
mstorsjo Feb 20, 2025
f7b6f23
[llvm-dlltool] Add a missing dependency
mstorsjo Feb 20, 2025
c86df91
release/20.x: [Clang] Fix various bugs in alias CTAD transform
zyn0217 Mar 22, 2025
ecde8c2
[clang] fix matching of nested template template parameters
mizvekov Mar 8, 2025
1a76c29
[hexagon] Enable --eh-frame-hdr (#130225)
androm3da Mar 10, 2025
d60baf3
[HEXAGON] Fix semantics of ordered FP compares (#131089)
aankit-ca Mar 13, 2025
3e2801e
[PowerPC] Support conversion between f16 and f128 (#130158)
lei137 Mar 19, 2025
90cc9ca
[Hexagon] Set the default compilation target to V68 (#125239)
iajbar Jan 31, 2025
d1f5a9f
[hexagon] Bump the default version to v68 (#132304)
quic-akaryaki Mar 22, 2025
3d5f5ef
workflows: Add missing apt-get update to abi tests (#133264)
tstellar Mar 27, 2025
2406e0d
Revert "[MC] Explicitly mark MCSymbol for MO_ExternalSymbol" (#133291)
efriedma-quic Mar 28, 2025
c1c4d71
[clang-format] Allow `Language: Cpp` for C files (#133033)
owenca Mar 27, 2025
44a6f6a
[libcxx] [test] Fix restoring LLVM_DIR and Clang_DIR (#132838)
mstorsjo Mar 26, 2025
943b432
release/20.x: [clang][docs] Move -Wnontrivial-memcall to added flags.…
R-Goc Mar 29, 2025
5ba1949
[MC,COFF] .safeseh: avoid changeSection (#132624)
MaskRay Mar 26, 2025
d6d1dbf
[ARM] Speedups for CombineBaseUpdate. (#129725)
davemgreen Mar 6, 2025
bc65196
update test due to https://github.com/llvm/llvm-project/pull/126880 n…
lei137 Mar 27, 2025
2f6c580
[workflows] Add missing -y option to apt-get for abi tests (#133337)
tstellar Mar 31, 2025
e740675
[PATCH] [clang][modules] Fix serialization and de-serialization of PC…
koplas Mar 25, 2025
f07f968
Backport/20.x: [LoongArch] Fix the type of tls-le symbols
zhaoqi5 Mar 21, 2025
ba00d9f
[LoongArch] Pre-commit test for #133225
wangleiat Mar 28, 2025
e256eda
[LoongArch][MC] Add relocation support for fld fst [x]vld [x]vst
wangleiat Mar 28, 2025
58df0ef
Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (#131578)
anutosh491 Mar 17, 2025
656289f
Bump version to 20.1.3 (#134187)
tstellar Apr 3, 2025
cf7bb13
[TailDuplicator] Determine if computed gotos using `blockaddress` (#1…
dianqk Mar 26, 2025
53141e4
[clang] Do not infer lifetimebound for functions with void return typ…
usx95 Mar 24, 2025
ac31db0
[Sanitizers][Darwin][Test] XFAIL malloc_zone.cpp
wrotki Apr 1, 2025
19c2e1c
[clang-tidy] Fix broken HeaderFilterRegex when read from config file …
carlosgalvezp Apr 3, 2025
41aefdb
cuda clang: Fix argument order for __reduce_max_sync (#132881)
AustinSchuh Mar 26, 2025
a8b5fe0
[libc++] Add missing release note for LLVM 20 about zip_view (#134144)
ldionne Apr 3, 2025
a0c8959
[X86] When expanding LCMPXCHG16B_SAVE_RBX, substitute RBX in base (#1…
aaronpuchert Apr 3, 2025
7436329
Revert "[clang] [ARM] Explicitly enable NEON for Windows/Darwin targe…
mstorsjo Apr 4, 2025
4181e82
[LLDB][LoongArch] Fix build errors about NT_LOONGARCH_HW_{BREAK,WATCH…
seehearfeel Feb 7, 2025
edb54a7
Release/20.x: [clang-format] Set C11 instead of C17 for LK_C
owenca Apr 5, 2025
81220e6
[fatlto] Add coroutine passes when using FatLTO with ThinLTO (#134434)
ilovepi Apr 7, 2025
d05543e
[clang-format] Keep the space between `not` and a unary operator (#13…
owenca Apr 10, 2025
91647ae
[X86][SSE] Don't emit SSE2 load instructions in SSE1-only mode (#134547)
thrimbor Apr 9, 2025
d15fef4
[IndVarSimplify] Handle the case where both operands are the same whe…
dtcxzyw Apr 11, 2025
d5bb7b8
Avoid a race condition in opt-viewer/optrecord (#131214)
hroncok Apr 2, 2025
e0db588
[IR] Fix assertion error in User new/delete edge case (#129914)
marcauberer Mar 10, 2025
2e7710e
[clang] Introduce "binary" StringLiteral for #embed data (#127629)
Fznamznon Mar 20, 2025
7034995
[clang] Handle Binary StingLiteral kind in one more place (#132201)
Fznamznon Mar 20, 2025
73d1e85
[CodeGen] Avoid repeated hash lookups (NFC) (#130237)
kazutakahirata Mar 7, 2025
d88cd35
[llvm][CodeGen] Fix the empty interval issue in Window Scheduler (#12…
huaatian Mar 17, 2025
a141e58
[llvm][CodeGen] avoid repeated interval calculation in window schedul…
huaatian Apr 3, 2025
0dd4235
[SCEV] Use ashr to adjust constant multipliers (#135534)
dtcxzyw Apr 13, 2025
2e09664
[X86] Backport saturate-convert intrinsics renaming & YMM rounding in…
phoebewang Apr 13, 2025
0c30835
[X86][AVX10] Remove VAES and VPCLMULQDQ feature from AVX10.1 (#135489)
phoebewang Apr 14, 2025
9c7d728
[LoongArch] Move fix-tle-le-sym-type test to test/MC. NFC (#133839)
zhaoqi5 Apr 2, 2025
dc9d4f9
[lldb] Respect LaunchInfo::SetExecutable in ProcessLauncherPosixFork …
labath Mar 27, 2025
dfd6f12
[libc++] Guard additional headers with _LIBCPP_HAS_LOCALIZATION (#131…
ldionne Apr 4, 2025
86c9853
[libc++] Fix deployment targets that were incorrectly bumped (#134278)
ldionne Apr 4, 2025
2131242
[LLVM][MemCpyOpt] Unify alias tags if we optimize allocas (#129537)
DominikAdamski Apr 10, 2025
91a3f14
[LV] Add tests with FindLastIV and epilogue vectorization.
fhahn Apr 14, 2025
c5109be
[LV] Disable epilogue vectorization for FindLastIV if start is poison.
fhahn Apr 14, 2025
4da7285
Silence -Wcast-function-type warnings on idiomatic Windows code (#135…
AaronBallman Apr 15, 2025
9420327
[Clang] Fix a lambda pattern comparison mismatch after ecc7e6ce4 (#13…
zyn0217 Apr 3, 2025
d55c3c2
[libc++] Fix misplaced _LIBCPP_POP_MACROS (#134874)
ldionne Apr 8, 2025
86f5891
[llvm][Hexagon] Promote operand v2i1 to v2i32 (#135409)
iajbar Apr 11, 2025
923a5c4
Revert "[ARM][ConstantIslands] Correct MinNoSplitDisp calculation (#1…
alexrp Apr 15, 2025
ab0074f
Bump version to 20.1.4
tstellar Apr 16, 2025
78f6719
[GlobalMerge][PPC] Don't merge globals in llvm.metadata section (#131…
nikic Apr 2, 2025
89adc2d
[HEXAGON] Fix corner cases for hwloops pass (#135439)
aankit-ca Apr 14, 2025
581772e
[LoongArch] Don't crash on instruction prefetch intrinsics (#135760)
leecheechen Apr 16, 2025
62072e7
[clang][AST] Handle implicit first argument in CallExpr::getBeginLoc()
HighCommander4 Apr 15, 2025
d76ec6a
[lldb] Fix SBTarget::ReadInstruction with flavor (#134626)
da-viper Apr 11, 2025
8f288eb
[lldb][test] Adjust TestTargetReadInstructionsFlavor skipIfs
DavidSpickett Apr 11, 2025
e7ae553
[clang-format] Fix mismatched break in BlockIndent (#124998)
gedare Jan 31, 2025
2d7ad98
[clang][analyzer] Fix error path of builtin overflow (#136345)
pskrgag Apr 20, 2025
425d1aa
[RISCV] Handle scalarized reductions in getArithmeticReductionCost
lukel97 Apr 21, 2025
182e8b7
[clang-format] Correctly annotate kw_operator in using decls (#136545)
owenca Apr 23, 2025
24805c2
[lldb] Use correct path for lldb-server executable (#131519)
yuvald-sweet-security Mar 31, 2025
1cf8c77
[GlobalOpt] Do not promote malloc if there are atomic loads/stores (#…
nikic Apr 24, 2025
57a31e1
[InstCombine] Do not fold logical is_finite test (#136851)
dtcxzyw Apr 23, 2025
f4779c3
[InstCombine] Preserve signbit semantics of NaN with fold to fabs (#1…
dtcxzyw Apr 26, 2025
c877757
[clang-repl] : Fix clang-repl crash with --cuda flag (#136404)
anutosh491 Apr 26, 2025
02afcbf
[SystemZ] Fix compile time regression in adjustInliningThreshold(). (…
JonPsson1 Apr 28, 2025
8c2dc1b
[clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cas…
anutosh491 Apr 1, 2025
ec28b8f
[libcxx] [test] Extend mingw workarounds for armv7/aarch64 too (#136419)
mstorsjo Apr 22, 2025
ebfae55
Bump version to 20.1.5
tstellar Apr 30, 2025
aecbb23
[Clang] Fix the trailing comma regression (#136273)
zyn0217 Apr 18, 2025
be4097b
Fix crash lowering stack guard on OpenBSD/aarch64. (#125416)
3405691582 Mar 31, 2025
a38e1ae
[AArch64][SME2] Don't preserve ZT0 around SME ABI routines (#132722)
MacDue Mar 25, 2025
069ef67
[AArch64][SME] Allow spills of ZT0 around SME ABI routines again (#13…
MacDue Apr 25, 2025
8272e45
[flang] Exempt construct entities from SAVE check for PURE (#131383)
klausler Mar 19, 2025
6ddf2e5
[clang-tidy] Do not pass any file when listing checks in run_clang_ti…
carlosgalvezp Apr 29, 2025
70eed33
[InstCombine] Do not combine shuffle+bitcast if the bitcast is elimin…
rj-jesus Apr 30, 2025
009f3c1
[LLD][COFF] Don't dllimport from static libraries (#134443)
aganea Apr 7, 2025
961ce35
[OpenMP] Add pre sm_70 load hack back in (#138589)
jhuber6 May 5, 2025
2386c37
[BasicAA] Gracefully handle large LocationSize (#138528)
nikic May 6, 2025
ae97a56
[Hexagon] Add missing patterns to select PFALSE and PTRUE (#138712)
iajbar May 6, 2025
2b34040
[clang-repl] Fix destructor for interpreter for the cuda negation cas…
anutosh491 May 5, 2025
be087ab
[libc++] Re-introduce _LIBCPP_DISABLE_AVAILABILITY (#134158)
ldionne May 5, 2025
5429418
[clang] Add support for Debian 14 Forky and Debian 15 Duke (#138460)
tambry May 4, 2025
a7166c3
release/20.x: [clang-format] RemoveParentheses shouldn't remove empty…
owenca May 3, 2025
d34d529
Support z17 processor name and scheduler description
uweigand Apr 11, 2025
4370072
[clang] Forward TPL of NestedNameSpecifier
hahnjo Apr 29, 2025
f811c7d
[rtsan][Apple] Add interceptor for _os_nospin_lock_lock (#131034)
davidtrevelyan Mar 13, 2025
b7b834e
[RTSan][Darwin] Adjust OSSpinLock/_os_nospin_lock interceptor and tes…
thetruestblue Apr 18, 2025
0019b7d
[wasm-ld] Refactor WasmSym from static globals to per-link context (#…
anutosh491 Apr 25, 2025
72ad9be
[Clang][MicrosoftMangle] Implement mangling for ConstantMatrixType (#…
Losy001 Apr 26, 2025
41c36d9
[clang] Fix unused variable warning in MS mangler from constant matri…
rnk Apr 26, 2025
f233430
[AArch64] Fix feature list for FUJITSU-MONAKA processor (#139212)
ytmukai May 9, 2025
2cacf46
[X86][TargetLowering] Avoid deleting temporary nodes in `getNegatedEx…
dtcxzyw May 10, 2025
2d079b9
release/20.x: [clang-format] Fix a crash on formatting missing r_pare…
owenca May 10, 2025
74ed1ac
[sanitizer_common] Fix build on ppc64+musl (#120036)
mojyack Apr 10, 2025
0439d1d
[Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSi…
cor3ntin May 2, 2025
1c03684
[clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (…
steakhal Feb 17, 2025
a708fb7
[RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (#136842)
wangpc-pp Apr 27, 2025
7b09d7b
[analyzer] Workaround for slowdown spikes (unintended scope increase)…
NagyDonat May 12, 2025
1e4d39e
Bump version to 20.1.6
tstellar May 14, 2025
ff2e8f9
Fix test pfalse-v4i1.ll added in #138712 to require asserts.
dyung May 7, 2025
85e06a7
[LoongArch] Fix fp_to_uint/fp_to_sint conversion errors for lasx (#13…
tangaac May 7, 2025
e3d2c00
[LLD][COFF] Allow -arm64xsameaddress in ARM64EC directives (#139631)
cjacek May 15, 2025
5befd1f
[Clang][AST] Fix HandleLValueBase to deal with references (#140105)
shafik May 15, 2025
a169f5c
Correct position of CFI Instruction for Pointer Authentication"
DanielKristofKiss Apr 29, 2025
070cf62
[Clang] Demote mixed enumeration arithmetic error to a warning (#131811)
cor3ntin Mar 18, 2025
8a36b8e
[clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr
fangyi-zhou Apr 17, 2025
9b08325
[SDAG] Ensure load is included in output chain of sincos expansion (#…
MacDue May 20, 2025
802f4f7
[clang-format] Handle raw string literals containing JSON code (#140666)
owenca May 21, 2025
15ec590
release/20.x: [clang-format] Fix the indent of StartOfName after Attr…
owenca May 22, 2025
6fcb1c1
[LoongArch] Fix assertion failure for annotate tablejump (#140907)
heiher May 22, 2025
53393e2
[LoongArch] Prevent R0/R1 allocation for rj operand of [G]CSRXCHG (#1…
heiher May 22, 2025
aa804fd
[sanitizer_common] Remove interceptors for deprecated struct termio (…
tstellar Apr 28, 2025
5d99a97
[MachO] Improve bounds check (#141083)
nikic May 26, 2025
0e1ef69
[Driver] Fix _XOPEN_SOURCE definition on Solaris (#137141)
rorth Apr 26, 2025
4b6e5a2
[clang-format] Handle Java text blocks (#141334)
owenca May 25, 2025
47addd4
[libclc] Include isnan implementation for SPIR-V targets
karolherbst May 21, 2025
7cf1453
Bump version to 20.1.7
tstellar May 28, 2025
7759bb5
[clang] Serialization: support hashing null template arguments
mizvekov May 29, 2025
e0586e2
[RelLookupTableConverter] Drop unnamed_addr to avoid generating GOTPC…
dianqk Jun 1, 2025
f653271
[clang-format] Correctly annotate token-pasted function decl names (#…
owenca Jun 2, 2025
e5dd4f1
[clangd] Guard against trivial FunctionProtoTypeLoc when creating inl…
HighCommander4 Jun 9, 2025
22a3e6b
release/20.x: [AArch64] Handle XAR with v1i64 operand types (#141754)
davemgreen May 29, 2025
2481e59
[AArch64][SME] Fix accessing the emergency spill slot with hazard pad…
MacDue Jun 2, 2025
acf86c5
[CVP] Keep `ReachableCaseCount` in sync with range of condition (#142…
dtcxzyw Jun 2, 2025
253e932
[release/20.x] Update release notes for SystemZ changes (#140060)
uweigand Jun 12, 2025
2da24c3
[libcxx] Provide locale conversions to tests through lit substitution…
mstorsjo Feb 28, 2025
b8e10ca
[libc++] Fix check for _LIBCPP_HAS_NO_WIDE_CHARACTERS in features.py …
ldionne Mar 18, 2025
3d3c392
out-of-process JIT execution
Jun 19, 2025
3fb8054
get pid of executor
Jun 20, 2025
1cb05ee
removed iostream
Jun 20, 2025
c3ee2ff
removed patch file
Jun 20, 2025
c1f0483
removed threads, handled pipes
Jun 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .github/workflows/libclang-abi-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ jobs:
uses: llvm/actions/install-ninja@main
- name: Install abi-compliance-checker
run: |
sudo apt-get install abi-dumper autoconf pkg-config
sudo apt-get update
sudo apt-get install -y abi-dumper autoconf pkg-config
- name: Install universal-ctags
run: |
git clone https://github.com/universal-ctags/ctags.git
Expand Down Expand Up @@ -154,7 +155,9 @@ jobs:
path: build-latest

- name: Install abi-compliance-checker
run: sudo apt-get install abi-compliance-checker
run: |
sudo apt-get update
sudo apt-get install -y abi-compliance-checker
- name: Compare ABI
run: |
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/llvm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ jobs:
uses: llvm/actions/install-ninja@main
- name: Install abi-compliance-checker
run: |
sudo apt-get install abi-dumper autoconf pkg-config
sudo apt-get update
sudo apt-get -y install abi-dumper autoconf pkg-config
- name: Install universal-ctags
run: |
git clone https://github.com/universal-ctags/ctags.git
Expand Down Expand Up @@ -163,7 +164,9 @@ jobs:
path: symbol-list

- name: Install abi-compliance-checker
run: sudo apt-get install abi-compliance-checker
run: |
sudo apt-get update
sudo apt-get -y install abi-compliance-checker
- name: Compare ABI
run: |
if [ -s symbol-list/llvm.symbols ]; then
Expand Down
36 changes: 19 additions & 17 deletions clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,18 +311,7 @@ ClangTidyDiagnosticConsumer::ClangTidyDiagnosticConsumer(
: Context(Ctx), ExternalDiagEngine(ExternalDiagEngine),
RemoveIncompatibleErrors(RemoveIncompatibleErrors),
GetFixesFromNotes(GetFixesFromNotes),
EnableNolintBlocks(EnableNolintBlocks) {

if (Context.getOptions().HeaderFilterRegex &&
!Context.getOptions().HeaderFilterRegex->empty())
HeaderFilter =
std::make_unique<llvm::Regex>(*Context.getOptions().HeaderFilterRegex);

if (Context.getOptions().ExcludeHeaderFilterRegex &&
!Context.getOptions().ExcludeHeaderFilterRegex->empty())
ExcludeHeaderFilter = std::make_unique<llvm::Regex>(
*Context.getOptions().ExcludeHeaderFilterRegex);
}
EnableNolintBlocks(EnableNolintBlocks) {}

void ClangTidyDiagnosticConsumer::finalizeLastError() {
if (!Errors.empty()) {
Expand Down Expand Up @@ -571,17 +560,30 @@ void ClangTidyDiagnosticConsumer::checkFilters(SourceLocation Location,
}

StringRef FileName(File->getName());
LastErrorRelatesToUserCode =
LastErrorRelatesToUserCode || Sources.isInMainFile(Location) ||
(HeaderFilter &&
(HeaderFilter->match(FileName) &&
!(ExcludeHeaderFilter && ExcludeHeaderFilter->match(FileName))));
LastErrorRelatesToUserCode = LastErrorRelatesToUserCode ||
Sources.isInMainFile(Location) ||
(getHeaderFilter()->match(FileName) &&
!getExcludeHeaderFilter()->match(FileName));

unsigned LineNumber = Sources.getExpansionLineNumber(Location);
LastErrorPassesLineFilter =
LastErrorPassesLineFilter || passesLineFilter(FileName, LineNumber);
}

llvm::Regex *ClangTidyDiagnosticConsumer::getHeaderFilter() {
if (!HeaderFilter)
HeaderFilter =
std::make_unique<llvm::Regex>(*Context.getOptions().HeaderFilterRegex);
return HeaderFilter.get();
}

llvm::Regex *ClangTidyDiagnosticConsumer::getExcludeHeaderFilter() {
if (!ExcludeHeaderFilter)
ExcludeHeaderFilter = std::make_unique<llvm::Regex>(
*Context.getOptions().ExcludeHeaderFilterRegex);
return ExcludeHeaderFilter.get();
}

void ClangTidyDiagnosticConsumer::removeIncompatibleErrors() {
// Each error is modelled as the set of intervals in which it applies
// replacements. To detect overlapping replacements, we use a sweep line
Expand Down
4 changes: 4 additions & 0 deletions clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ class ClangTidyDiagnosticConsumer : public DiagnosticConsumer {
/// context.
llvm::Regex *getHeaderFilter();

/// Returns the \c ExcludeHeaderFilter constructed for the options set in the
/// context.
llvm::Regex *getExcludeHeaderFilter();

/// Updates \c LastErrorRelatesToUserCode and LastErrorPassesLineFilter
/// according to the diagnostic \p Location.
void checkFilters(SourceLocation Location, const SourceManager &Sources);
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ ClangTidyOptions ClangTidyOptions::getDefaults() {
Options.WarningsAsErrors = "";
Options.HeaderFileExtensions = {"", "h", "hh", "hpp", "hxx"};
Options.ImplementationFileExtensions = {"c", "cc", "cpp", "cxx"};
Options.HeaderFilterRegex = std::nullopt;
Options.ExcludeHeaderFilterRegex = std::nullopt;
Options.HeaderFilterRegex = "";
Options.ExcludeHeaderFilterRegex = "";
Options.SystemHeaders = false;
Options.FormatStyle = "none";
Options.User = std::nullopt;
Expand Down
7 changes: 4 additions & 3 deletions clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def find_compilation_database(path: str) -> str:


def get_tidy_invocation(
f: str,
f: Optional[str],
clang_tidy_binary: str,
checks: str,
tmpdir: Optional[str],
Expand Down Expand Up @@ -147,7 +147,8 @@ def get_tidy_invocation(
start.append(f"--warnings-as-errors={warnings_as_errors}")
if allow_no_checks:
start.append("--allow-no-checks")
start.append(f)
if f:
start.append(f)
return start


Expand Down Expand Up @@ -490,7 +491,7 @@ async def main() -> None:

try:
invocation = get_tidy_invocation(
"",
None,
clang_tidy_binary,
args.checks,
None,
Expand Down
7 changes: 6 additions & 1 deletion clang-tools-extra/clangd/InlayHints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/identity.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormatVariadic.h"
Expand Down Expand Up @@ -368,7 +369,11 @@ static FunctionProtoTypeLoc getPrototypeLoc(Expr *Fn) {
}

if (auto F = Target.getAs<FunctionProtoTypeLoc>()) {
return F;
// In some edge cases the AST can contain a "trivial" FunctionProtoTypeLoc
// which has null parameters. Avoid these as they don't contain useful
// information.
if (llvm::all_of(F.getParams(), llvm::identity<ParmVarDecl *>()))
return F;
}

return {};
Expand Down
5 changes: 5 additions & 0 deletions clang-tools-extra/clangd/unittests/InlayHintTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,11 +997,16 @@ TEST(ParameterHints, FunctionPointer) {
f3_t f3;
using f4_t = void(__stdcall *)(int param);
f4_t f4;
__attribute__((noreturn)) f4_t f5;
void bar() {
f1($f1[[42]]);
f2($f2[[42]]);
f3($f3[[42]]);
f4($f4[[42]]);
// This one runs into an edge case in clang's type model
// and we can't extract the parameter name. But at least
// we shouldn't crash.
f5(42);
}
)cpp",
ExpectedHint{"param: ", "f1"}, ExpectedHint{"param: ", "f2"},
Expand Down
6 changes: 6 additions & 0 deletions clang-tools-extra/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ Improvements to clang-tidy
:doc:`readability-redundant-access-specifiers <clang-tidy/checks/readability/redundant-access-specifiers>`, CheckFirstDeclaration
:doc:`readability-redundant-casting <clang-tidy/checks/readability/redundant-casting>`, IgnoreTypeAliases

- Fixed bug in :program:`clang-tidy` by which `HeaderFilterRegex` did not take
effect when passed via the `.clang-tidy` file.

- Fixed bug in :program:`run_clang_tidy.py` where the program would not
correctly display the checks enabled by the top-level `.clang-tidy` file.

New checks
^^^^^^^^^^

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HeaderFilterRegex: '.*'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// RUN: clang-tidy -checks=-*,google-explicit-constructor %s 2>&1 | FileCheck %s
#include "foo.h"
// CHECK: foo.h:1:12: warning: single-argument constructors must be marked explicit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
struct X { X(int); };
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
InheritParentConfig: true
HeaderFilterRegex: 'subfolder/.*'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// shell is required for the "dirname" command
// REQUIRES: shell
// RUN: clang-tidy -checks=-*,google-explicit-constructor %s -- -I "$(dirname %S)" 2>&1 | FileCheck %s
#include "foo.h"
// CHECK-NOT: foo.h:1:12: warning: single-argument constructors must be marked explicit

#include "bar.h"
// CHECK: bar.h:1:13: warning: single-argument constructors must be marked explicit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
struct XX { XX(int); };
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HeaderFilterRegex: '.*'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// RUN: clang-tidy -checks=-*,google-explicit-constructor %s 2>&1 | FileCheck %s
#include "foo.h"
// CHECK: foo.h:1:12: warning: single-argument constructors must be marked explicit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
struct X { X(int); };
36 changes: 31 additions & 5 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ C++2c Feature Support

- Implemented `P3176R1 The Oxford variadic comma <https://wg21.link/P3176R1>`_

- The error produced when doing arithmetic operations on enums of different types
can be disabled with ``-Wno-enum-enum-conversion``. (#GH92340)

C++23 Feature Support
^^^^^^^^^^^^^^^^^^^^^
- Removed the restriction to literal types in constexpr functions in C++23 mode.
Expand Down Expand Up @@ -545,6 +548,11 @@ New Compiler Flags
- The ``-Warray-compare-cxx26`` warning has been added to warn about array comparison
starting from C++26, this warning is enabled as an error by default.

- The ``-Wnontrivial-memcall`` warning has been added to warn about
passing non-trivially-copyable destination parameter to ``memcpy``,
``memset`` and similar functions for which it is a documented undefined
behavior. It is implied by ``-Wnontrivial-memaccess``

- clang-cl and clang-dxc now support ``-fdiagnostics-color=[auto|never|always]``
in addition to ``-f[no-]color-diagnostics``.

Expand Down Expand Up @@ -576,11 +584,6 @@ Modified Compiler Flags
to utilize these vector libraries. The behavior for all other vector function
libraries remains unchanged.

- The ``-Wnontrivial-memcall`` warning has been added to warn about
passing non-trivially-copyable destination parameter to ``memcpy``,
``memset`` and similar functions for which it is a documented undefined
behavior. It is implied by ``-Wnontrivial-memaccess``

- Added ``-fmodules-reduced-bmi`` flag corresponding to
``-fexperimental-modules-reduced-bmi`` flag. The ``-fmodules-reduced-bmi`` flag
is intended to be enabled by default in the future.
Expand Down Expand Up @@ -694,6 +697,16 @@ Improvements to Clang's diagnostics
match a template template parameter, in terms of the C++17 relaxed matching rules
instead of the old ones.

- No longer diagnosing idiomatic function pointer casts on Windows under
``-Wcast-function-type-mismatch`` (which is enabled by ``-Wextra``). Clang
would previously warn on this construct, but will no longer do so on Windows:

.. code-block:: c

typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
HMODULE Lib = LoadLibrary("kernel32");
PGNSI FnPtr = (PGNSI)GetProcAddress(Lib, "GetNativeSystemInfo");

- Don't emit duplicated dangling diagnostics. (#GH93386).

- Improved diagnostic when trying to befriend a concept. (#GH45182).
Expand Down Expand Up @@ -899,6 +912,8 @@ Bug Fixes in This Version
being deleted has a potentially throwing destructor (#GH118660).
- Clang now outputs correct values when #embed data contains bytes with negative
signed char values (#GH102798).
- Fix crash due to unknown references and pointer implementation and handling of
base classes. (GH139452)

Bug Fixes to Compiler Builtins
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -1058,8 +1073,13 @@ Bug Fixes to C++ Support
- Fixed a substitution bug in transforming CTAD aliases when the type alias contains a non-pack template argument
corresponding to a pack parameter (#GH124715)
- Clang is now better at keeping track of friend function template instance contexts. (#GH55509)
- Fixes matching of nested template template parameters. (#GH130362)
- Correctly diagnoses template template paramters which have a pack parameter
not in the last position.
- Fixed an integer overflow bug in computing template parameter depths when synthesizing CTAD guides. (#GH128691)
- Fixed an incorrect pointer access when checking access-control on concepts. (#GH131530)
- Fixed various alias CTAD bugs involving variadic template arguments. (#GH123591), (#GH127539), (#GH129077),
(#GH129620), and (#GH129998).

Bug Fixes to AST Handling
^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -1098,6 +1118,7 @@ Miscellaneous Clang Crashes Fixed

- Fixed a crash when an unscoped enumeration declared by an opaque-enum-declaration within a class template
with a dependent underlying type is subject to integral promotion. (#GH117960)
- Fix code completion crash involving PCH serialzied templates. (#GH139019)

OpenACC Specific Changes
------------------------
Expand Down Expand Up @@ -1252,6 +1273,8 @@ RISC-V Support
- The option ``-mcmodel=large`` for the large code model is supported.
- Bump RVV intrinsic to version 1.0, the spec: https://github.com/riscv-non-isa/rvv-intrinsic-doc/releases/tag/v1.0.0-rc4

- `Zicsr` / `Zifencei` are allowed to be duplicated in the presence of `g` in `-march`.

CUDA/HIP Language Changes
^^^^^^^^^^^^^^^^^^^^^^^^^
- Fixed a bug about overriding a constexpr pure-virtual member function with a non-constexpr virtual member function which causes compilation failure when including standard C++ header `format`.
Expand Down Expand Up @@ -1450,6 +1473,9 @@ Crash and bug fixes
- The ``unix.BlockInCriticalSection`` now recognizes the ``lock()`` member function
as expected, even if it's inherited from a base class. Fixes (#GH104241).

- Fixed a crash when C++20 parenthesized initializer lists are used. This issue
was causing a crash in clang-tidy. (#GH136041)

Improvements
^^^^^^^^^^^^

Expand Down
15 changes: 12 additions & 3 deletions clang/include/clang/AST/Expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,14 @@ enum class StringLiteralKind {
UTF8,
UTF16,
UTF32,
Unevaluated
Unevaluated,
// Binary kind of string literal is used for the data coming via #embed
// directive. File's binary contents is transformed to a special kind of
// string literal that in some cases may be used directly as an initializer
// and some features of classic string literals are not applicable to this
// kind of a string literal, for example finding a particular byte's source
// location for better diagnosing.
Binary
};

/// StringLiteral - This represents a string literal expression, e.g. "foo"
Expand Down Expand Up @@ -1884,6 +1891,8 @@ class StringLiteral final
int64_t getCodeUnitS(size_t I, uint64_t BitWidth) const {
int64_t V = getCodeUnit(I);
if (isOrdinary() || isWide()) {
// Ordinary and wide string literals have types that can be signed.
// It is important for checking C23 constexpr initializers.
unsigned Width = getCharByteWidth() * BitWidth;
llvm::APInt AInt(Width, (uint64_t)V);
V = AInt.getSExtValue();
Expand Down Expand Up @@ -4965,9 +4974,9 @@ class EmbedExpr final : public Expr {
assert(EExpr && CurOffset != ULLONG_MAX &&
"trying to dereference an invalid iterator");
IntegerLiteral *N = EExpr->FakeChildNode;
StringRef DataRef = EExpr->Data->BinaryData->getBytes();
N->setValue(*EExpr->Ctx,
llvm::APInt(N->getValue().getBitWidth(), DataRef[CurOffset],
llvm::APInt(N->getValue().getBitWidth(),
EExpr->Data->BinaryData->getCodeUnit(CurOffset),
N->getType()->isSignedIntegerType()));
// We want to return a reference to the fake child node in the
// EmbedExpr, not the local variable N.
Expand Down
6 changes: 5 additions & 1 deletion clang/include/clang/Basic/DiagnosticSemaKinds.td
Original file line number Diff line number Diff line change
Expand Up @@ -7567,9 +7567,13 @@ def warn_arith_conv_mixed_enum_types_cxx20 : Warning<
"%sub{select_arith_conv_kind}0 "
"different enumeration types%diff{ ($ and $)|}1,2 is deprecated">,
InGroup<DeprecatedEnumEnumConversion>;
def err_conv_mixed_enum_types_cxx26 : Error<

def err_conv_mixed_enum_types: Error <
"invalid %sub{select_arith_conv_kind}0 "
"different enumeration types%diff{ ($ and $)|}1,2">;
def zzzz_warn_conv_mixed_enum_types_cxx26 : Warning <
err_conv_mixed_enum_types.Summary>,
InGroup<EnumEnumConversion>, DefaultError;

def warn_arith_conv_mixed_anon_enum_types : Warning<
warn_arith_conv_mixed_enum_types.Summary>,
Expand Down
4 changes: 3 additions & 1 deletion clang/include/clang/Driver/Distro.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Distro {
DebianBullseye,
DebianBookworm,
DebianTrixie,
DebianForky,
DebianDuke,
Exherbo,
RHEL5,
RHEL6,
Expand Down Expand Up @@ -128,7 +130,7 @@ class Distro {
bool IsOpenSUSE() const { return DistroVal == OpenSUSE; }

bool IsDebian() const {
return DistroVal >= DebianLenny && DistroVal <= DebianTrixie;
return DistroVal >= DebianLenny && DistroVal <= DebianDuke;
}

bool IsUbuntu() const {
Expand Down
Loading