[clang] 0982db1 - [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

2022-10-10 Thread Tom Honermann via cfe-commits
Author: Tom Honermann Date: 2022-10-10T15:45:02-04:00 New Revision: 0982db188b661d6744b06244fda64d43dd80206e URL: https://github.com/llvm/llvm-project/commit/0982db188b661d6744b06244fda64d43dd80206e DIFF: https://github.com/llvm/llvm-project/commit/0982db188b661d6744b06244fda64d43dd80206e.diff

[PATCH] D135500: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

2022-10-10 Thread Tom Honermann via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0982db188b66: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm… (authored by tahonermann). Repository: rG LLVM Gith

[clang] 6b89e89 - Reword diagnostics for style; NFC

2022-10-10 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-10-10T15:53:48-04:00 New Revision: 6b89e897e7dc73dc6a112b18920deb8282aaca97 URL: https://github.com/llvm/llvm-project/commit/6b89e897e7dc73dc6a112b18920deb8282aaca97 DIFF: https://github.com/llvm/llvm-project/commit/6b89e897e7dc73dc6a112b18920deb8282aaca97.diff

[PATCH] D135370: Narrow inline namespace filtration for unqualified friend declarations

2022-10-10 Thread Troy Johnson via Phabricator via cfe-commits
troyj added a comment. I agree. I wouldn't want to mislead people into thinking that they'll see this improvement on everything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135370/new/ https://reviews.llvm.org/D135370 __

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 466595. hokein added a comment. print memory usage in SourceManager::PrintStats. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135440/new/ https://reviews.llvm.org/D135440 Files: clang/include/clang/Basic/Sou

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. >> SemaExpr.cpp: 149529494 -> 149502874 > > Are these numbers backwards? Why would memory usage go down? Oops, you're right, I made a mistake, correct it in the description. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1354

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-10 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. More data on clang memory usage (measured with the `clang -cc1 -fsyntax-only -print-stats`, AST size = ASTContext + Decl + Stmt/Expr; Total = AST size + SourceManager size) The memory increase for C++ is negligible (< 1%), but for C, we have ~5% memory increase. |

[PATCH] D135614: [OpenMP][CUDA][AMDGPU] Accept case insensitive subarchitecture names

2022-10-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, yaxunl, tra. Herald added subscribers: kosarev, mattd, guansong, hiraditya, t-tye, tpr, dstuttard, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-co

[PATCH] D135440: [SourceManager] Speedup getFileIDLocal with a separate Offset Table.

2022-10-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Is it worth it and possible to fully decompose `LocalSLocEntryTable` into arrays of its constituent parts, and only construct a `SLocEntry` when necessary? I'm ok with the c

[PATCH] D135518: [clangAST] support TypeLoc in TextNodeDumper

2022-10-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this! Should we make similar changes to the `JSONNodeDumper` as well? (It doesn't seem to have `TypeLoc` support.) Comment at: clang/include/clang/AST/ASTDumperUtils.h:55-56 static const TerminalColor TypeColor = {llvm::

[PATCH] D135500: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.

2022-10-10 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann marked 2 inline comments as done. tahonermann added inline comments. Comment at: clang/lib/Sema/SemaStmtAsm.cpp:937 for (uint64_t I = 0; I < NumOutputs + NumInputs; ++I) { -if (Exprs[I]->getType()->isBitIntType()) - return StmtError( - Diag(Exprs[

[PATCH] D135091: Fix assert in generated `direct` property getter/setters due to removal of `_cmd` parameter.

2022-10-10 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 466602. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135091/new/ https://reviews.llvm.org/D135091 Files: clang/lib/CodeGen/CGObjC.cpp clang/test/CodeGenObjC/direct-method.m Index: clang/test/CodeGenObjC/direct-method.m =

[PATCH] D135614: [OpenMP][CUDA][AMDGPU] Accept case insensitive subarchitecture names

2022-10-10 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Is that really something we need/want to do? I've never seen anyone complaining about this particular issue. clang/gcc are case-sensitive for similar options, like `-march`: https://godbolt.org/z/3jKzTda7h I think offloading options should behave consistently in that regard

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D133668#3847163 , @rjmccall wrote: > Sure, but it's extremely easy to unpromote that arithmetic for most > operators, and I'm sure LLVM already has a pass that will do that. Okay... but HLSL explicitly doesn't promote. Having t

[PATCH] D135614: [OpenMP][CUDA][AMDGPU] Accept case insensitive subarchitecture names

2022-10-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D135614#3847775 , @tra wrote: > Is that really something we need/want to do? I've never seen anyone > complaining about this particular issue. > > clang/gcc are case-sensitive for similar options, like `-march`: > https://god

[clang] 52b8f3a - [LinkerWrapper] Fix failing linker wrapper save temps test

2022-10-10 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-10-10T15:56:46-05:00 New Revision: 52b8f3a80c6b2b1efcd91e2278bd9d63a0b1567b URL: https://github.com/llvm/llvm-project/commit/52b8f3a80c6b2b1efcd91e2278bd9d63a0b1567b DIFF: https://github.com/llvm/llvm-project/commit/52b8f3a80c6b2b1efcd91e2278bd9d63a0b1567b.diff

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-10-10 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 466612. samitolvanen marked 2 inline comments as done. samitolvanen added a comment. Addressed feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135411/new/ https://reviews.llvm.org/D135411 Files:

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-10-10 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:48-49 + SmallVector KCFICalls; + for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { +if (auto *CI = dyn_cast(&*I)) + if (CI->getOperandBundle(LLVMContext::OB

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:445-446 +const CharacterLiteral *E) { + if (Optional T = classify(E->getType())) +return this->emitConst(E, E->getValue()); + `T` isn't used and `classify()` already

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D133668#3847807 , @beanz wrote: > In D133668#3847163 , @rjmccall > wrote: > >> Sure, but it's extremely easy to unpromote that arithmetic for most >> operators, and I'm sure LLVM alr

[PATCH] D135461: [LLDB] Fix crash when printing a struct with a static wchar_t member

2022-10-10 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:1298 + case BuiltinType::WChar_U: +break; // no suffix. } DavidSpickett wrote: > Is there any reason to have a suffix here? > > I admit this function is puzzling to me anyway given

[PATCH] D135461: [LLDB] Fix crash when printing a struct with a static wchar_t member

2022-10-10 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 466622. aeubanks added a comment. update python test, although those changes don't actually test the code path changed here, the code path here is tested via the existing `self.expect("image lookup -t A")` Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/test/AST/Interp/arrays.cpp:143 + +}; tahonermann wrote: > As others already noted, additional testing of multicharacter literals and > UCNs (including named universal characters like `\N{LATIN_CAPITAL_LETTER_E}`

[PATCH] D135429: [HLSL] [DirectX backend] Move generateGlobalCtorDtorCalls into DirectX backend.

2022-10-10 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 466623. python3kgae added a comment. Add end of file newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135429/new/ https://reviews.llvm.org/D135429 Files: clang/lib/CodeGen/CGHLSLRuntime.cpp clang/

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D133668#3847871 , @rjmccall wrote: > But that's purely on the implementation level, right? Everything is > implicitly vectorized and you're just specifying the computation of a single > lane, but as far as that lane-wise compu

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-10-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:48-49 + SmallVector KCFICalls; + for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) { +if (auto *CI = dyn_cast(&*I)) + if (CI->getOperandBundle(LLVMContext:

[PATCH] D135551: [clang] replace `assert(0)` with `llvm_unreachable` NFC

2022-10-10 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D135551#3847607 , @aaron.ballman wrote: > In D135551#3847444 , @dblaikie > wrote: > >> I thought this was settled quite a while ago and enshrined in the style >> guide: https://llvm

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-10-10 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 466635. samitolvanen added a comment. Switched to `instructions(F)`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135411/new/ https://reviews.llvm.org/D135411 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. If you have `char`, would you want it to promote? Because turning `char` to `_BitInt(8)` is breaking with C on other grounds (like aliasing), for better or worse. So if you just don't want promotion, maybe you really should just disable promotion. Repository: rG

[PATCH] D135326: Half-done attempt to move tail padding callback from TargetCXXABI to TargetInfo

2022-10-10 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think in the end, perhaps it is not worth disturbing this code. Comment at: clang/lib/Basic/Targets/OSTargets.h:169 +if (T.getOS() == llvm::Triple::WatchOS || +this->getCXXABI().getKind() == TargetCXXABI::AppleARM64) + return TargetInfo::

[PATCH] D135628: [clang][codegen] Don't emit atomic loads for threadsafe init if they aren't inline

2022-10-10 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: rjmccall, nikic. Herald added a project: All. efriedma requested review of this revision. Herald added a project: clang. Performing a load before calling __cxa_guard_acquire is supposed to be an optimization, but it isn't much of one if we

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D135595#3847158 , @beanz wrote: > In D135595#3847056 , @python3kgae > wrote: > >> Backend needs the same thing. >> Is it possible to move this to llvm and share it between frontend

[PATCH] D135628: [clang][codegen] Don't emit atomic loads for threadsafe init if they aren't inline

2022-10-10 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 466657. efriedma added a comment. Upload correct version of patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135628/new/ https://reviews.llvm.org/D135628 Files: clang/lib/CodeGen/ItaniumCXXABI.cpp clan

[PATCH] D131698: [Sema] Fix `ExtVectorElementExpr` tree transform for the `isArrow` case.

2022-10-10 Thread Michele Scandale via Phabricator via cfe-commits
michele.scandale added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131698/new/ https://reviews.llvm.org/D131698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2022-10-10 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 40. Izaron added a comment. Rebased onto main (after a long long time). Thanks to @LegalizeAdulthood for instructions! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118743/new/ https://reviews.llvm.org/D118

[PATCH] D135422: [clang-format] Fix misattributing preprocessor directives to macros

2022-10-10 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. LGTM. In D135422#3847053 , @jacob-abraham wrote: > I do not have commit access, can someone make this commit on my behalf? Thank > you! We need your name and email address for the authorship.

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2022-10-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/modernize/use-inline-const-variables-in-headers.rst:5 +=== + + Excessive newline. Repository: rG LLVM Github Monorepo CHAN

[PATCH] D118743: [clang-tidy] Add `modernize-use-inline-const-variables-in-headers` check

2022-10-10 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 41. Izaron added a comment. Removed excessive newline. Thanks to @Eugene.Zelenko! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118743/new/ https://reviews.llvm.org/D118743 Files: clang-tools-extra/clang

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-10-10 Thread Bill Wendling via Phabricator via cfe-commits
void added a reviewer: rsmith. void added a subscriber: rsmith. void added a comment. @rsmith, @serge-sans-paille, and @kees, I need some advice. There's a test in `clang/test/CodeGen/bounds-checking.c` that's checking bounds stuff on unions. The behavior is...weird to me. It says that an array

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. We should absolutely add utility functions when we have uses for them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135595/new/ https://reviews.llvm.org/D135595 ___ cfe-commits ma

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-10-10 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. +#clang-vendors for ABI changes Comment at: clang/include/clang/Basic/TargetInfo.h:1569 + virtual bool areDefaultedSMFStillPOD(const LangOptions&) const; + Please add a doc comment for this,

[PATCH] D135422: [clang-format] Fix misattributing preprocessor directives to macros

2022-10-10 Thread Jacob Abraham via Phabricator via cfe-commits
jacob-abraham added a comment. > We need your name and email address for the authorship. Name: Jacob Abraham Email: jacob.r.abra...@gmail.com CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135422/new/ https://reviews.llvm.org/D135422 ___ cfe-

[PATCH] D135557: Add needsImplicitDefaultConstructor and friends

2022-10-10 Thread Anders Langlands via Phabricator via cfe-commits
anderslanglands updated this revision to Diff 48. anderslanglands added a comment. Fixed clang-format error Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135557/new/ https://reviews.llvm.org/D135557 Files: clang/bindings/python/clang/cindex.

[clang] a089def - [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-10 Thread Christopher Di Bella via cfe-commits
Author: Christopher Di Bella Date: 2022-10-11T00:13:58Z New Revision: a089defa24dd4050192e1e8d7e704188d2214787 URL: https://github.com/llvm/llvm-project/commit/a089defa24dd4050192e1e8d7e704188d2214787 DIFF: https://github.com/llvm/llvm-project/commit/a089defa24dd4050192e1e8d7e704188d2214787.dif

[clang] 14e64cb - [clang] makes `__is_destructible` KEYALL instead of KEYMS

2022-10-10 Thread Christopher Di Bella via cfe-commits
Author: Christopher Di Bella Date: 2022-10-11T00:13:58Z New Revision: 14e64cb8d594c16c722da83d3e8af9fc0d013c4e URL: https://github.com/llvm/llvm-project/commit/14e64cb8d594c16c722da83d3e8af9fc0d013c4e DIFF: https://github.com/llvm/llvm-project/commit/14e64cb8d594c16c722da83d3e8af9fc0d013c4e.dif

[clang] bd3f48e - [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

2022-10-10 Thread Christopher Di Bella via cfe-commits
Author: Christopher Di Bella Date: 2022-10-11T00:13:58Z New Revision: bd3f48eefc11c2f1ef6eb034418697e24e9a965d URL: https://github.com/llvm/llvm-project/commit/bd3f48eefc11c2f1ef6eb034418697e24e9a965d DIFF: https://github.com/llvm/llvm-project/commit/bd3f48eefc11c2f1ef6eb034418697e24e9a965d.dif

[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

2022-10-10 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbd3f48eefc11: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins (authored by cjdb). Repository: rG LLVM Github Monorepo CH

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-10 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa089defa24dd: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable` (authored by cjdb). Repository: rG LLVM Github Monorepo C

[PATCH] D135339: [clang] makes `__is_destructible` KEYALL instead of KEYMS

2022-10-10 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG14e64cb8d594: [clang] makes `__is_destructible` KEYALL instead of KEYMS (authored by cjdb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D131698: [Sema] Fix `ExtVectorElementExpr` tree transform for the `isArrow` case.

2022-10-10 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131698/new/ https://reviews.llvm.org/D131698 ___

[PATCH] D135628: [clang][codegen] Don't emit atomic loads for threadsafe init if they aren't inline

2022-10-10 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Makes sense. Nice code-size optimization at any rate. Hmm, actually, along those lines, should we do the same thing at `-Oz`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D133066: fix a typo in comment of AddConversionCandidate

2022-10-10 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. In D133066#3846907 , @aaron.ballman wrote: > In D133066#3845136 , @zhouyizhou > wrote: > >> After 4 weeks' study, I think the comment didn't need to be changed, sorry >> to have brin

[PATCH] D135634: [clang][modules] Serialize VFS overlay paths into PCMs

2022-10-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: akyrtzi, benlangmuir, Bigcheese. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With implicitl

[PATCH] D135636: [clang][modules][deps] Serialize inputs into PCMs using the "as requested" name

2022-10-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch changes the

[PATCH] D135637: [clang][deps] Prevent emitting diagnostics outside of source file

2022-10-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The dependency scanner

[PATCH] D131698: [Sema] Fix `ExtVectorElementExpr` tree transform for the `isArrow` case.

2022-10-10 Thread Michele Scandale via Phabricator via cfe-commits
michele.scandale updated this revision to Diff 466686. michele.scandale added a comment. Final rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131698/new/ https://reviews.llvm.org/D131698 Files: clang/lib/Sema/TreeTransform.h clang/test/S

[PATCH] D131698: [Sema] Fix `ExtVectorElementExpr` tree transform for the `isArrow` case.

2022-10-10 Thread Michele Scandale via Phabricator via cfe-commits
michele.scandale added a comment. @rjmccall would you be able to land this on my behalf? Thanks in advance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131698/new/ https://reviews.llvm.org/D131698 ___

[PATCH] D135422: [clang-format] Fix misattributing preprocessor directives to macros

2022-10-10 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:654 break; + if(Line->InMacroBody != InMacroBody) +break; Did you run `git-clang-format`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135422/n

[clang] b0758f6 - [clang-format] Fix mis-attributing preprocessor directives to macros

2022-10-10 Thread via cfe-commits
Author: Jacob Abraham Date: 2022-10-10T19:57:58-07:00 New Revision: b0758f62afb6945edfb2046da10b338bb6ced474 URL: https://github.com/llvm/llvm-project/commit/b0758f62afb6945edfb2046da10b338bb6ced474 DIFF: https://github.com/llvm/llvm-project/commit/b0758f62afb6945edfb2046da10b338bb6ced474.diff

[PATCH] D135422: [clang-format] Fix misattributing preprocessor directives to macros

2022-10-10 Thread Owen Pan via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb0758f62afb6: [clang-format] Fix mis-attributing preprocessor directives to macros (authored by jacob-abraham, committed by owenpan). Changed prior

[PATCH] D131858: [clang] Track the templated entity in type substitution.

2022-10-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Serialization/ASTWriterDecl.cpp:623-626 + VisitDeclaratorDecl(D); + Record.AddDeclarationNameLoc(D->DNLoc, D->getDeclName()); + Record.push_back(D->getIdentifierNamespace()); + mizvekov wrote: > ChuanqiXu

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D134267#3847399 , @iains wrote: > FAOD: I think this should not be about "who's patches" - but about the > compilation model and command lines that we want to end up with. Yeah, of course. > I am concerned that with the cu

[PATCH] D135569: [clang][Interp] Don't run functions immediately after compiling them

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D135569#3847493 , @aaron.ballman wrote: > This function is testing whether something is potentially a constant > expression. Something might not be a valid constant expression for two > reasons: 1) it uses some prohibited la

[PATCH] D135513: [clang][Interp] Check instance pointers before calling functions on them

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Interp.h:1166 +// TODO: CheckCallable + } + I think this is okay to do for now, but in the long run we need to check *all* the parameters passed to function calls... CHANGES SINCE LAST ACTION

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked 3 inline comments as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:445-446 +const CharacterLiteral *E) { + if (Optional T = classify(E->getType())) +return this->emitConst(E, E->getValue()); + ta

[PATCH] D135366: [clang][Interp] Implement String- and CharacterLiterals

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 466700. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135366/new/ https://reviews.llvm.org/D135366 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/test/AST/I

[PATCH] D135555: [libclang] CIndex: Visit UsingTypeLoc as TypeRef

2022-10-10 Thread Kai Stierand via Phabricator via cfe-commits
kiloalphaindia updated this revision to Diff 466701. kiloalphaindia added a comment. renamed function `from_CXString` -> `fromCXString` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13/new/ https://reviews.llvm.org/D13 Files: clang/tools

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-10-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. In D134902#3848246 , @void wrote: > @rsmith, @serge-sans-paille, and @kees, I need some advice. There's a test in > `clang/test/CodeGen/bounds-checking.c` that's checking bounds stuff on > unions. The behavior is...wei

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-10-10 Thread Kees Cook via Phabricator via cfe-commits
kees added a comment. In D134902#3848246 , @void wrote: > @rsmith, @serge-sans-paille, and @kees, I need some advice. There's a test in > `clang/test/CodeGen/bounds-checking.c` that's checking bounds stuff on > unions. The behavior is...weird to me. It

[PATCH] D134902: [clang] Implement -fstrict-flex-arrays=3

2022-10-10 Thread Kees Cook via Phabricator via cfe-commits
kees added a comment. In D134902#3848595 , @serge-sans-paille wrote: > I second the opinion here. C99 says nothing about flexible array member for > unions, that's already a "language extension". (and so not be considered as > FAM by `-fstrict-flex-arr

[PATCH] D135558: [Clang][NFC]Use isa instead of dyn_cast in shouldAddReversedEqEq

2022-10-10 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. This was fixed as https://github.com/llvm/llvm-project/commit/6c49d5db30227d21e929bb12dc046c36ede67fad. Note that for such patches, you don't need to wait for review, like Erich didn't. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D135555: [libclang] CIndex: Visit UsingTypeLoc as TypeRef

2022-10-10 Thread Kai Stierand via Phabricator via cfe-commits
kiloalphaindia added a comment. @sammccall I don't think I can commit anything. Can you please do it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13/new/ https://reviews.llvm.org/D13 ___ cfe-co

[PATCH] D133488: [clang][PowerPC][NFC] Add base test case for PPC64 VAArg aggregate smaller than a slot

2022-10-10 Thread Ting Wang via Phabricator via cfe-commits
tingwang updated this revision to Diff 466708. tingwang added a comment. Rebase on opaque-pointers test case changes && Gentle ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133488/new/ https://reviews.llvm.org/D133488 Files: clang/test/Cod

[PATCH] D133338: [clang][PowerPC] PPC64 VAArg use coerced integer type for direct aggregate fits in register

2022-10-10 Thread Ting Wang via Phabricator via cfe-commits
tingwang updated this revision to Diff 466710. tingwang added a comment. Rebase && Gentle ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D18/new/ https://reviews.llvm.org/D18 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeG

[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules

2022-10-10 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. In D134267#3848539 , @ChuanqiXu wrote: > In D134267#3847399 , @iains wrote: > >> >> I am concerned that with the current scheme (with or without the change in >> this review) we could e

<    1   2