[PATCH] D151100: [clang][Diagnostics] Merge byte/column mapping functions into one.

2023-05-22 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: cjdb, aaron.ballman. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. They were both only called from one place and did very similar things. Mer

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4360668 , @arsenm wrote: >> It would most likely invalid, but I'm not asserting that `clang` should be >> responsible for diagnosing misuse in these cases. Especially because in >> generic freestanding C++ we don't ha

[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

2023-05-22 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8465-8470 +if (TC->getTriple().isAMDGPU()) { + for (StringRef Feature : llvm::split(Arch.split(':').second, ':')) { +FeatureArgs.emplace_back( +Args.MakeArgString(Featur

[PATCH] D150966: [clang] Don't define predefined macros multiple times

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:241-242 Builder.defineMacro("__ARM_FEATURE_QRDMX", "1"); - Builder.defineMacro("__ARM_FEATURE_ATOMICS", "1"); - Builder.defineMacro("__ARM_FEATURE_CRC32", "1"); } Hmm, is t

[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8465-8470 +if (TC->getTriple().isAMDGPU()) { + for (StringRef Feature : llvm::split(Arch.split(':').second, ':')) { +FeatureArgs.emplace_back( +Args.MakeArgString(Feature

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D151087#4360606 , @jhuber6 wrote: > In D151087#4360577 , @ebevhan wrote: > >> What would be the semantics of such an operation if the address spaces are >> disjoint? Or, if the underly

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4360729 , @ebevhan wrote: > That's fair. I would like clang to improve and formalize the semantics for > generic address space behavior a bit, which was part of the point with D62574 >

[PATCH] D151098: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though it's a bit jarring that `-march` suggests using `-mcpu=help` (should we ensure that `-march=help` works on all targets instead?) Repository: rG LLVM Github Monore

[PATCH] D146557: [MLIR][OpenMP] Refactoring createTargetData in OMPIRBuilder

2023-05-22 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 524301. TIFitis added a comment. Moved map processing code from functor to new static function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: llvm/include/

[PATCH] D151098: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151098#4360750 , @aaron.ballman wrote: > LGTM, though it's a bit jarring that `-march` suggests using `-mcpu=help` > (should we ensure that `-march=help` works on all targets instead?) Using `-march=help` works inadvertentl

[PATCH] D151088: [flang][hlfir] Separate -emit-fir and -emit-hlfir

2023-05-22 Thread Jean Perier via Phabricator via cfe-commits
jeanPerier accepted this revision. jeanPerier added a comment. This revision is now accepted and ready to land. Not the driver expert here, so please wait for @awarzynski input, but the new flag logic LGTM from a user point of view. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D150902: [ARM][Driver] Warn if -mhard-float is incompatible

2023-05-22 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings updated this revision to Diff 524302. michaelplatings added a comment. Tweak tests to use -### to run faster. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150902/new/ https://reviews.llvm.org/D150902 Files: clang/include/clang/B

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D151087#4360743 , @jhuber6 wrote: > The problem is we don't have `addrspace_cast` in freestanding C++, so as it > stands we currently have no way to perform this operation in C++ which is > preventing me from implementing thi

[PATCH] D150860: [OpenMP] Change clang emitTargetDataCalls to use OMPIRBuilder

2023-05-22 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 524310. TIFitis added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150860/new/ https://reviews.llvm.org/D150860 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/test/OpenMP/target_dat

[PATCH] D151098: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D151098#4360758 , @jhuber6 wrote: > In D151098#4360750 , @aaron.ballman > wrote: > >> LGTM, though it's a bit jarring that `-march` suggests using `-mcpu=help` >> (should we ens

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4360818 , @ebevhan wrote: > By "freestanding C++" I assume you mean "C++ without the OpenCL C++ > extension" and not "C++ without extensions at all", because in the latter > case, you don't have address spaces either.

[PATCH] D148216: Add support for annotations in UpdateTestChecks (NFC)

2023-05-22 Thread Henrik G Olsson via Phabricator via cfe-commits
hnrklssn added inline comments. Comment at: clang/test/utils/update_cc_test_checks/Inputs/annotations.c.expected:12 +// CHECK-NEXT:[[TMP1:%.*]] = load i32, ptr [[X]], align 4 +// CHECK-NEXT:ret i32 [[TMP1]] +// hnrklssn wrote: > nikic wrote: > > hnrklssn

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-05-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Looks like this is causing a crash on current `main`: https://github.com/llvm/llvm-project/issues/62838 Please take a look and revert the commit if it requires longer to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146

[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-05-22 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
chaitanyav updated this revision to Diff 524321. chaitanyav added a comment. Rebase with upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147844/new/ https://reviews.llvm.org/D147844 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/Sema

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D151087#4360695 , @jhuber6 wrote: > I don't think that's something we can diagnose here with just the address > space number. it would require information from the underlying target for the > expected pointer qualities to the

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4360919 , @arsenm wrote: > In D151087#4360695 , @jhuber6 wrote: > >> I don't think that's something we can diagnose here with just the address >> space number. it would require

[PATCH] D151075: [clang][Diagnostics] Simplify emitSnippet()

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I think this logic is the same (it's a bit tricky to tell, so it's unfortunate that precommit CI isn't running for this to help validate), so LGTM. CHANGES SINCE LAST ACTION h

[clang] ba9590d - [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`

2023-05-22 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2023-05-22T10:28:46-05:00 New Revision: ba9590d8bc76f9d410a626c26a3d55e1381de4aa URL: https://github.com/llvm/llvm-project/commit/ba9590d8bc76f9d410a626c26a3d55e1381de4aa DIFF: https://github.com/llvm/llvm-project/commit/ba9590d8bc76f9d410a626c26a3d55e1381de4aa.diff

[PATCH] D151098: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`

2023-05-22 Thread Joseph Huber 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 rGba9590d8bc76: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help` (authored by jhuber6). Repository: rG LLVM Github Monore

[PATCH] D146557: [MLIR][OpenMP] Refactoring createTargetData in OMPIRBuilder

2023-05-22 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 524333. TIFitis added a comment. Renamed from processMapOp to genMapInfos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146557/new/ https://reviews.llvm.org/D146557 Files: llvm/include/llvm/Frontend/OpenMP/O

[PATCH] D148793: [WIP][clang-tidy] Implement an include-cleaner check.

2023-05-22 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 524336. VitaNuo marked 19 inline comments as done. VitaNuo added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148793/new/ https://reviews.llvm.org/D148793 Files: clang-to

[clang] 20856ed - [docs] Fix typo after D151098

2023-05-22 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-05-22T08:47:13-07:00 New Revision: 20856edd183b276da63493ee5e5f974faa9c6638 URL: https://github.com/llvm/llvm-project/commit/20856edd183b276da63493ee5e5f974faa9c6638 DIFF: https://github.com/llvm/llvm-project/commit/20856edd183b276da63493ee5e5f974faa9c6638.diff

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D151087#4360932 , @jhuber6 wrote: > How are they broken? The expectation is just that they line up with what the > backend defines them as, which should be a stable target. We could > potentially use target info to map the num

[clang] 9e7f14a - Revert "Reapply D146987 "[Assignment Tracking] Enable by default""

2023-05-22 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-05-22T08:53:15-07:00 New Revision: 9e7f14a8211c82dca64bd6b22d1c450d4c6d3e5b URL: https://github.com/llvm/llvm-project/commit/9e7f14a8211c82dca64bd6b22d1c450d4c6d3e5b DIFF: https://github.com/llvm/llvm-project/commit/9e7f14a8211c82dca64bd6b22d1c450d4c6d3e5b.diff

[PATCH] D151073: [clang] Fix label (de-)serialization in ASM statements.

2023-05-22 Thread Viktoriia Bakalova via Phabricator via cfe-commits
VitaNuo updated this revision to Diff 524342. VitaNuo marked 2 inline comments as done. VitaNuo added a comment. Update test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151073/new/ https://reviews.llvm.org/D151073 Files: clang/lib/Serial

[clang] 6b50e87 - [clang] Fix label (de-)serialization in ASM statements.

2023-05-22 Thread Viktoriia Bakalova via cfe-commits
Author: Viktoriia Bakalova Date: 2023-05-22T15:53:45Z New Revision: 6b50e87f21e131fb75d234acaa69b2386e3b6006 URL: https://github.com/llvm/llvm-project/commit/6b50e87f21e131fb75d234acaa69b2386e3b6006 DIFF: https://github.com/llvm/llvm-project/commit/6b50e87f21e131fb75d234acaa69b2386e3b6006.diff

[PATCH] D151073: [clang] Fix label (de-)serialization in ASM statements.

2023-05-22 Thread Viktoriia Bakalova 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 rG6b50e87f21e1: [clang] Fix label (de-)serialization in ASM statements. (authored by VitaNuo). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D150966: [clang] Don't define predefined macros multiple times

2023-05-22 Thread John Brawn via Phabricator via cfe-commits
john.brawn added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:241-242 Builder.defineMacro("__ARM_FEATURE_QRDMX", "1"); - Builder.defineMacro("__ARM_FEATURE_ATOMICS", "1"); - Builder.defineMacro("__ARM_FEATURE_CRC32", "1"); } aaron.ballma

[PATCH] D151100: [clang][Diagnostics] Merge byte/column mapping functions into one.

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, please add `NFC` to the patch summary when you land though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151100/new/ https:

[clang] 986cbd8 - [clang][AST] TextNodeDumper should not evaluate the initializer of constexpr variable declaration when it has a dependent type

2023-05-22 Thread Takuya Shimizu via cfe-commits
Author: Takuya Shimizu Date: 2023-05-23T00:57:38+09:00 New Revision: 986cbd80d1dc838c61abff24b8d7ac28dcf4ac2a URL: https://github.com/llvm/llvm-project/commit/986cbd80d1dc838c61abff24b8d7ac28dcf4ac2a DIFF: https://github.com/llvm/llvm-project/commit/986cbd80d1dc838c61abff24b8d7ac28dcf4ac2a.diff

[PATCH] D151033: [clang][AST] TextNodeDumper should not evaluate the initializer of constexpr variable declaration when it has a dependent type

2023-05-22 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG986cbd80d1dc: [clang][AST] TextNodeDumper should not evaluate the initializer of constexpr… (authored by hazohelet). Changed prior to commit: https://reviews.llvm.org/D151033?vs=524095&id=524346#toc Re

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4361081 , @arsenm wrote: > They bypass all semantic checks. For example if you declare something as > address space 4, it will let you write to it unlike __constant__. It will let > you place stack objects in globals

[PATCH] D151093: [clang][Diagnostic] Simplify emitDiagnosticLoc

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, though please add NFC to the patch summary when landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151093/new/ https://r

[PATCH] D150083: [clang-format] ObjCPropertyAttributeOrder to sort ObjC property attributes

2023-05-22 Thread Jared Grubb via Phabricator via cfe-commits
jaredgrubb updated this revision to Diff 524351. jaredgrubb marked an inline comment as done. jaredgrubb added a comment. Address review comments: unroll a loop in unit tests to explicitly test all the property attributes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150083/new/ https

[PATCH] D151061: [test] Add ext_vector_type tests for C

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the additional test coverage! The changes LGTM modulo the suggestion from @fhahn on how to improve the comments. (Note, given your goal of verifying that operations work, you might want to consider adding similar coverage for CodeGen tests to verify

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I like the current behaviour of bypass semantic checking and emit IR with the same number on it as my primary use case for feeding freestanding C++ to clang is as a convenient way to emit specific IR and I'm not that bothered about clang detecting mistakes along

[PATCH] D151059: [test] Add C++ ext_vector_type tests

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this coverage as well! Are there issues filed for the FIXME comments so we have a more prominent record of the problems? LGTM modulo comment concerns. Comment at: clang/test/SemaCXX/vector.cpp:554 +void test_int_vector_scalar(unsig

[PATCH] D151047: [clang-format] Fix indentation for selective formatting.

2023-05-22 Thread Sedenion via Phabricator via cfe-commits
Sedeniono added a comment. @MyDeveloperDay Thanks for the positive review. Regarding https://github.com/llvm/llvm-project/issues/56352 and the Beyoncé Rule, the original fix for the crash actually added a test (see the changes made at that time

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D151087#4360859 , @jhuber6 wrote: > You can have address spaced in freestanding C++, they just need to be > assigned according to the backens, e.g. https://godbolt.org/z/ahazae6Ta. And > I don't think that's a desirable solut

[PATCH] D148266: [clang][driver] Linking to just-built libc++.dylib when bootstrapping libc++ with clang

2023-05-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:431 + // libc++.dylib in the toolchain. + if ((!Args.hasArg(options::OPT_nostdinc, options::OPT_nostdlibinc, +options::OPT_nostdincxx)) && ldionne wrote: > Th

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4361237 , @ebevhan wrote: > Clang hasn't needed to formalize all of the address space behavior because > it's managed to piggyback off of the language semantics provided by OpenCL, > and no targets really have had a n

[PATCH] D150892: [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 524359. nickdesaulniers added a comment. - rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150892/new/ https://reviews.llvm.org/D150892 Files: clang/docs/ReleaseNotes.rst clang/lib/AST/ExprCon

[PATCH] D150122: [Clang] Fix status of P0960

2023-05-22 Thread Alan Zhao via Phabricator via cfe-commits
ayzhao added a subscriber: shafik. ayzhao added a comment. Status update on backports: - https://github.com/llvm/llvm-project/issues/62266 has been backported in https://github.com/llvm/llvm-project-release-prs/pull/441 - https://github.com/llvm/llvm-project/issues/61567 is still waiting on @sha

[PATCH] D150966: [clang] Don't define predefined macros multiple times

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:241-242 Builder.defineMacro("__ARM_FEATURE_QRDMX", "1"); - Builder.defineMacro("__ARM_FEATURE_ATOMICS", "1"); - Builder.defineMacro("__ARM_FEATURE_CRC32", "1"); } john.braw

[PATCH] D151121: [Clang][UBSan] Fix the crash caused by __builtin_assume_aligned with -no-opaque-pointers enabled

2023-05-22 Thread Yurong via Phabricator via cfe-commits
yronglin created this revision. Herald added a project: All. yronglin requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: yronglin Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D151121 Files: clang/lib/Cod

[PATCH] D145403: [Pipeline] Don't run EarlyFPM in LTO post link

2023-05-22 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. I was trying to get this landed with https://reviews.llvm.org/D145265 so I could measure the impact of the two together. But also now there are some merge conflicts that I'd rather deal with after submitting D145265 . But that patch is

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D151087#4361263 , @jhuber6 wrote: > I'd rather have an operation whose semantics are a little dangerous than > something that doesn't work at all. As it stands we need to use C-style casts > for this and I don't think there's

[clang] 279a4d0 - -fsanitize=function: support C

2023-05-22 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-05-22T10:11:30-07:00 New Revision: 279a4d0d67c874e80c171666822f2fabdd6fa926 URL: https://github.com/llvm/llvm-project/commit/279a4d0d67c874e80c171666822f2fabdd6fa926 DIFF: https://github.com/llvm/llvm-project/commit/279a4d0d67c874e80c171666822f2fabdd6fa926.diff

[PATCH] D148827: -fsanitize=function: support C

2023-05-22 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG279a4d0d67c8: -fsanitize=function: support C (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D148827?vs=524110&id=524374#toc Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. This change seems to be causing problems on the emscripten auto-roller: https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8780394114149321217/overview Failures show up in ubsan tests and look like this: error: symbol '_Z4testi' unsupported subtracti

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. (I guess this also mean we are lacking some upstream testing for ubsan + wasm + mc?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148573/new/ https://reviews.llvm.org/D148573 __

[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-05-22 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
chaitanyav updated this revision to Diff 524376. chaitanyav added a comment. Rebase with upstream Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147844/new/ https://reviews.llvm.org/D147844 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/Sema

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4361367 , @ebevhan wrote: > I don't think the standard argument really holds. It doesn't mention > restrictions on address spaces because it doesn't have to, since they don't > exist in C++. If they did, I'm pretty su

[PATCH] D145183: [libc++] Implement `stop_token`

2023-05-22 Thread Hui via Phabricator via cfe-commits
huixie90 updated this revision to Diff 524387. huixie90 added a comment. Herald added subscribers: cfe-commits, llvm-commits, lldb-commits, Sanitizers, TinaAMD, hoy, bviyer, wlei, jplehr, mgehre-amd, luke, hanchung, jsetoain, Moerafaat, zero9178, pcwang-thead, anlunx, Enna1, bzcheeseman, mattd,

[clang] 39ba913 - [Driver] -fsanitize=function: unsupport wasm after D148573

2023-05-22 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-05-22T10:40:04-07:00 New Revision: 39ba913d13ab15c76cb6b5aa066fa111ddfe944b URL: https://github.com/llvm/llvm-project/commit/39ba913d13ab15c76cb6b5aa066fa111ddfe944b DIFF: https://github.com/llvm/llvm-project/commit/39ba913d13ab15c76cb6b5aa066fa111ddfe944b.diff

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148573#4361396 , @sbc100 wrote: > This change seems to be causing problems on the emscripten auto-roller: > https://ci.chromium.org/ui/p/emscripten-releases/builders/try/linux/b8780394114149321217/overview > > Failures show

[PATCH] D145183: [libc++] Implement `stop_token`

2023-05-22 Thread Valentin Clement via Phabricator via cfe-commits
clementval added a comment. Herald added a subscriber: JDevlieghere. Something seems wrong with this patch. It contains multiple unrelated changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145183/new/ https://reviews.llvm.org/D145183

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I don't feel `reinterpret_cast` is the right fit for this as it's expected to do just reinterpretation but `addrspacecast` LLVM instruction which Clang generates might result in some more operations in particular some special instructions for address calculation. Woul

[PATCH] D151032: [clang] Add test for CWG2213

2023-05-22 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. This revision is now accepted and ready to land. Thank you, I think more examples are never bad, LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151032/new/ https://reviews.llvm.org/D151032

[PATCH] D141907: [CMake] Ensure `CLANG_RESOURCE_DIR` is respected

2023-05-22 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. In D141907#4355229 , @paperchalice wrote: > In D141907#4355228 , @tstellar > wrote: > >> @paperchalice Do you need someone to commit this for you? > > Sure, I don't have the commit acce

[PATCH] D151034: [clang] Add test for CWG1397

2023-05-22 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik 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/D151034/new/ https://reviews.llvm.org/D151034 ___

[PATCH] D151034: [clang] Add test for CWG1397

2023-05-22 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CXX/drs/dr13xx.cpp:488 +#if __cplusplus == 201103L + // expected-error@#dr1397-struct-A {{default member initializer for 'p' needed within definition of enclosing class 'A' outside of member functions}} + // expected-note@#d

[PATCH] D151128: [clangd] Show size, offset and padding for bit fields on hover

2023-05-22 Thread SR_team via Phabricator via cfe-commits
SR_team created this revision. SR_team added a reviewer: sammccall. SR_team added a project: clang-tools-extra. Herald added subscribers: kadircet, arphaman. Herald added a project: All. SR_team requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. In so

[PATCH] D151061: [test] Add ext_vector_type tests for C

2023-05-22 Thread Cassie Jones via Phabricator via cfe-commits
porglezomp updated this revision to Diff 524405. porglezomp added a comment. Address the comment suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151061/new/ https://reviews.llvm.org/D151061 Files: clang/test/Sema/ext_vector_ops.c cla

[PATCH] D145403: [Pipeline] Don't run EarlyFPM in LTO post link

2023-05-22 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 524406. aeubanks added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145403/new/ https://reviews.llvm.org/D145403 Files: llvm/lib/Passes/PassBuilderPipelines.cpp llvm/test/Other/new-pm-p

[PATCH] D144911: adding bf16 support to NVPTX

2023-05-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:315-318 -} else if (RC == &NVPTX::BFloat16RegsRegClass) { - Ret = (9 << 28); -} else if (RC == &NVPTX::BFloat16x2RegsRegClass) { - Ret = (10 << 28); There's still s

[PATCH] D151130: [NFC][CLANG] Fix static code analyzer concerns with dereference null return value

2023-05-22 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. Herald added a project: All. Manna requested review of this revision. Herald added a project: clang. Reported by Static Analyzer Tool: Inside "SemaExprMember

[PATCH] D151061: [test] Add ext_vector_type tests for C

2023-05-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151061/new/ https://reviews.llvm.org/D151061

[PATCH] D151094: [clang][wip] Implement P2564 "consteval must propagate up"

2023-05-22 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 524408. cor3ntin marked 9 inline comments as done. cor3ntin added a comment. Herald added a subscriber: martong. Herald added a reviewer: shafik. - Address Aaron's comments - Track which expressions are immediately escalating to offer better diagnostics Rep

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. It's weird to have C-style casts that can't be done with any combination of named casts, so I think this makes some sense. I do think it should be limited to numbered address spaces of the same size, though, rather than basing it on whether we're in OpenCL mode. Targ

[clang] 57c5c1a - [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2023-05-22T11:38:38-07:00 New Revision: 57c5c1ab2a188b7962c9de5ac0f95e3c7441940a URL: https://github.com/llvm/llvm-project/commit/57c5c1ab2a188b7962c9de5ac0f95e3c7441940a DIFF: https://github.com/llvm/llvm-project/commit/57c5c1ab2a188b7962c9de5ac0f95e3c7441940a.di

[PATCH] D150892: [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG57c5c1ab2a18: [clang][ExprConstant] fix __builtin_object_size for flexible array members (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D151133: [clang-tidy] Ignore implicit code in bugprone-branch-clone

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL created this revision. PiotrZSL added reviewers: njames93, carlosgalvezp. Herald added a subscriber: xazax.hun. Herald added a project: All. PiotrZSL requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Implicit code like, t

[PATCH] D147889: [clang-tidy] Improve bugprone-branch-clone with support for fallthrough attribute

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 524419. PiotrZSL added a comment. Rebase, Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147889/new/ https://reviews.llvm.org/D147889 Files: clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp

[PATCH] D148461: [clang-tidy] Support C++17/20 in bugprone-exception-escape

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148461/new/ https://reviews.llvm.org/D148461 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D147357: [clang-tidy] Add bugprone-optional-value-conversion check

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147357/new/ https://reviews.llvm.org/D147357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D148216: Add support for annotations in UpdateTestChecks (NFC)

2023-05-22 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/test/utils/update_cc_test_checks/Inputs/annotations.c.expected:12 +// CHECK-NEXT:[[TMP1:%.*]] = load i32, ptr [[X]], align 4 +// CHECK-NEXT:ret i32 [[TMP1]] +// hnrklssn wrote: > hnrklssn wrote: > > nikic wr

[PATCH] D146368: [clang-tidy] Add readability-reference-to-constructed-temporary check

2023-05-22 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146368/new/ https://reviews.llvm.org/D146368 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D151034: [clang] Add test for CWG1397

2023-05-22 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added a comment. Thank you for the review! Comment at: clang/test/CXX/drs/dr13xx.cpp:488 +#if __cplusplus == 201103L + // expected-error@#dr1397-struct-A {{default member initializer for 'p' needed within definition of enclosing class 'A' outside of member functions}}

[PATCH] D151137: ]NFC][Clang] Fix Coverity bug with dereference null return value in clang::​CodeGen::​CodeGenFunction::​EmitOMPArraySectionExpr()

2023-05-22 Thread Soumi Manna via Phabricator via cfe-commits
Manna created this revision. Manna added a reviewer: erichkeane. Herald added a project: All. Manna requested review of this revision. Reported by Coverity: Inside "CGExpr.cpp" file, in clang::​CodeGen::​CodeGenFunction::​EmitOMPArraySectionExpr(clang::​OMPArraySectionExpr const *, bool): Retu

[PATCH] D151088: [flang][hlfir] Separate -emit-fir and -emit-hlfir for flang-new

2023-05-22 Thread Slava Zakharin via Phabricator via cfe-commits
vzakhari accepted this revision. vzakhari added a comment. Thank you for the follow-up! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151088/new/ https://reviews.llvm.org/D151088 ___ cfe-commits mailing

[PATCH] D151130: [NFC][CLANG] Fix static code analyzer concerns with dereference null return value

2023-05-22 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. Thank you @erichkeane for reviews! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151130/new/ https://reviews.llvm.org/D151130 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. In D148573#4361509 , @MaskRay wrote: > In D148573#4361396 , @sbc100 wrote: > >> This change seems to be causing problems on the emscripten auto-roller: >> https://ci.chromium.org/ui/p/ems

[PATCH] D151059: [test] Add C++ ext_vector_type tests

2023-05-22 Thread Cassie Jones via Phabricator via cfe-commits
porglezomp updated this revision to Diff 524429. porglezomp added a comment. Address review comments. File GitHub issues and reference them with the FIXMEs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151059/new/ https://reviews.llvm.org/D151059

[PATCH] D151137: ]NFC][Clang] Fix Coverity bug with dereference null return value in clang::​CodeGen::​CodeGenFunction::​EmitOMPArraySectionExpr()

2023-05-22 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. Thank you @erichkeane for reviews! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151137/new/ https://reviews.llvm.org/D151137 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D151059: [test] Add C++ ext_vector_type tests

2023-05-22 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151059/new/ https://reviews.llvm.org/D151059

[PATCH] D151060: [Clang][Sema] Generate vector vs scalar builtin overloads

2023-05-22 Thread Cassie Jones via Phabricator via cfe-commits
porglezomp updated this revision to Diff 524432. porglezomp added a comment. Rebasing onto modified tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151060/new/ https://reviews.llvm.org/D151060 Files: clang/lib/Sema/SemaOverload.cpp clang/t

[PATCH] D143675: Discussion: Darwin Sanitizers Stable ABI

2023-05-22 Thread Roy Sundahl via Phabricator via cfe-commits
rsundahl added a comment. Hello Egenii, Thank you for your time and consideration of this PR. Since you last commented, @vitalybuka has approved the PR and added @maskray and yourself as blocking reviewers. @maskray has approved and we are awaiting your approval if you remain positive to it (o

[PATCH] D151047: [clang-format] Fix indentation for selective formatting.

2023-05-22 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Just a side note, please link to commits, or even better the reviews here when talking about old commits. I found it through the github issue, but I think the other way around is better. I was interested in the commit

[PATCH] D147844: [clang][Sema]Print diagnostic warning about precedence when integer expression is used without parentheses in an conditional operator expression

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D147844#4335598 , @dblaikie wrote: > In D147844#4329497 , @aaron.ballman > wrote: > >> In general, I think this is incremental progress on the diagnostic behavior. >> However, i

[PATCH] D150892: [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:11740 + LVal.getLValueBase().dyn_cast()); + Result += VD->getFlexibleArrayInitChars(Info.Ctx); +} nickdesaulniers wrote: > nickdesaulniers wrote: > > erichkeane wrote: >

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The address space feature is governed by TR 18037 (https://standards.iso.org/ittf/PubliclyAvailableStandards/c051126_ISO_IEC_TR_18037_2008.zip), see section 5. The TR says (in part): > A non-null pointer into an address space A can be cast to a pointer into > ano

[PATCH] D148573: Allow -fsanitize=function on all targets

2023-05-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D148573#4361894 , @sbc100 wrote: > In D148573#4361509 , @MaskRay wrote: > >> In D148573#4361396 , @sbc100 wrote: >> >>> This change seems to be

[PATCH] D150892: [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:11740 + LVal.getLValueBase().dyn_cast()); + Result += VD->getFlexibleArrayInitChars(Info.Ctx); +} efriedma wrote: > nickdesaulniers wrote: > > nickdesaulniers wrot

[PATCH] D150892: [clang][ExprConstant] fix __builtin_object_size for flexible array members

2023-05-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:11740 + LVal.getLValueBase().dyn_cast()); + Result += VD->getFlexibleArrayInitChars(Info.Ctx); +} nickdesaulniers wrote: > efriedma wrote: > > nickdesaulniers wrote: > >

<    1   2   3   >