[PATCH] D125622: [clang-tidy] Reject invalid enum initializers in C files

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood created this revision. LegalizeAdulthood added reviewers: aaron.ballman, njames93. LegalizeAdulthood added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. LegalizeAdulthood requested review of this revision. C

[PATCH] D106888: [LowerTypeTests][clang] Implement cfi-icall and allow -fsanitize=cfi-icall for RISCV

2022-05-14 Thread Fangrui Song 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 rG59afc4038b10: [LowerTypeTests][clang] Implement and allow -fsanitize=cfi-icall for RISCV (authored by twd2, committed by MaskRay). Repository: rG

[clang] 59afc40 - [LowerTypeTests][clang] Implement and allow -fsanitize=cfi-icall for RISCV

2022-05-14 Thread Fangrui Song via cfe-commits
Author: Wende Tan Date: 2022-05-14T18:05:06-07:00 New Revision: 59afc4038b1096bc6fea7b322091f6e5e2dc0b38 URL: https://github.com/llvm/llvm-project/commit/59afc4038b1096bc6fea7b322091f6e5e2dc0b38 DIFF: https://github.com/llvm/llvm-project/commit/59afc4038b1096bc6fea7b322091f6e5e2dc0b38.diff

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.cpp:204 + return true; +} + LegalizeAdulthood wrote: > aaron.ballman wrote: > >

[PATCH] D125620: [Clang] Fix diagnostics formatting

2022-05-14 Thread Tee KOBAYASHI via Phabricator via cfe-commits
xtkoba added a comment. The issue was first reported by @dev-bz at GitHub in https://github.com/termux/termux-packages/issues/9619. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125620/new/ https://reviews.llvm.org/D125620

[PATCH] D125620: [Clang] Fix diagnostics formatting

2022-05-14 Thread Tee KOBAYASHI via Phabricator via cfe-commits
xtkoba created this revision. Herald added a project: All. xtkoba requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When a `#warning` directive is followed by tokens containing non-ASCII characters encoded in UTF-8, a broken string can be

[PATCH] D106888: [RISC-V] Implement jump tables for CFI-icall

2022-05-14 Thread Wende Tan via Phabricator via cfe-commits
twd2 added a comment. In D106888#3513001 , @MaskRay wrote: > I'll wait a bit before pushing to check whether that further opinions. Thanks! I don't have commit access, so could you please commit on my behalf when appropriate? Wende Tan CHANGES SINCE

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:210-214 +std::ostream <<(std::ostream , + const clang::tidy::test::Param ) { + return

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood marked an inline comment as done. LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:210-214 +std::ostream <<(std::ostream , + const clang::tidy::test::Param ) { + return

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-05-14 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:210-214 +std::ostream <<(std::ostream , + const clang::tidy::test::Param ) { + return Str << "Matched: " << std::boolalpha << Value.Matched <<

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2022-05-14 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D123235#3513430 , @koops wrote: > I have tried on x64 RH and x64 SuSe. I could not reproduce the failures seen > on x64 debian. https://reviews.llvm.org/D118550 also has similar failures on > x64 debian. There is a

[PATCH] D123286: [Clang][OpenMP] Support for omp nothing

2022-05-14 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Can we have test for right usage? Comment at: clang/lib/Parse/ParseOpenMP.cpp:2496 +<< getOpenMPDirectiveName(DKind) << 0; +} +ConsumeToken(); clang-format plz, and remove the `{` and `}` as there is only one

[clang-tools-extra] 9d99cf5 - [clang-tidy] Restore test parameter operator<< function (NFC)

2022-05-14 Thread via cfe-commits
Author: Richard Date: 2022-05-14T14:04:32-06:00 New Revision: 9d99cf59a151a715ebebf3a4c4782dfdb48d7f4b URL: https://github.com/llvm/llvm-project/commit/9d99cf59a151a715ebebf3a4c4782dfdb48d7f4b DIFF: https://github.com/llvm/llvm-project/commit/9d99cf59a151a715ebebf3a4c4782dfdb48d7f4b.diff LOG:

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/performance-unused-no-side-effect.rst:25-26 + +A function is considered to "not read an argument unless the return value is +used" in the following cases: + The quotes

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-05-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 429479. cjdb added a comment. rebases for D116203 's sake Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116280/new/ https://reviews.llvm.org/D116280 Files:

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2022-05-14 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 429478. qchateau added a comment. Small correction Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112661/new/ https://reviews.llvm.org/D112661 Files: clang-tools-extra/clangd/ClangdServer.cpp

[PATCH] D124341: [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice.

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:56 ClangTidyCheck::OptionsView::get(StringRef LocalName) const { - const auto = CheckOptions.find(NamePrefix + LocalName.str()); + const auto = CheckOptions.find((NamePrefix

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:210-214 +std::ostream <<(std::ostream , + const clang::tidy::test::Param ) { + return Str << "Matched: " << std::boolalpha <<

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-05-14 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:210-214 +std::ostream <<(std::ostream , + const clang::tidy::test::Param ) { + return Str << "Matched: " << std::boolalpha <<

[PATCH] D112661: [clangd] reuse preambles from other files when possible

2022-05-14 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau updated this revision to Diff 429470. qchateau added a comment. Herald added a project: All. Resolve conflicts, fix formatting, simplify patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112661/new/ https://reviews.llvm.org/D112661

[PATCH] D125557: [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf

2022-05-14 Thread Jay Foad via Phabricator via cfe-commits
foad marked 2 inline comments as done. foad added inline comments. Comment at: llvm/lib/Analysis/ConstantFolding.cpp:2884 if (IntrinsicID == Intrinsic::smul_fix_sat) { - APInt Max = APInt::getSignedMaxValue(Width).sextOrSelf(ExtendedWidth); - APInt Min =

[PATCH] D125557: [APInt] Remove all uses of zextOrSelf, sextOrSelf and truncOrSelf

2022-05-14 Thread Jay Foad via Phabricator via cfe-commits
foad updated this revision to Diff 429466. foad added a comment. Address some review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125557/new/ https://reviews.llvm.org/D125557 Files: clang/lib/AST/ExprConstant.cpp

[PATCH] D125256: [OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP

2022-05-14 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Sorry - my mistake - its a different test failure now! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125256/new/ https://reviews.llvm.org/D125256 ___ cfe-commits mailing list

[PATCH] D125256: [OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP

2022-05-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D125256#3513596 , @RKSimon wrote: > @jhuber6 I think this or one of your other openmp commits has caused the > Driver/cuda-openmp-driver.cu test failure here: >

[PATCH] D125256: [OpenMP] Add `__CUDA_ARCH__` definition when offloading with OpenMP

2022-05-14 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @jhuber6 I think this or one of your other openmp commits has caused the Driver/cuda-openmp-driver.cu test failure here: https://lab.llvm.org/buildbot/#/builders/214/builds/1274/steps/6/logs/stdio Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-14 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D124751#3513283 , @MaskRay wrote: > Is there a specification or reference implementation stating that -E is used? > >> Option<["--", "/", "-"], "E", > > Do you need the prefix `--`? You may define something like `CLFlag`.

[clang-tools-extra] ffacaa0 - Fix unused function 'operator<<' -Wunused-function warning introduced in D124500

2022-05-14 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-05-14T13:48:26+01:00 New Revision: ffacaa0beccbe318090be600f8d2d2c33c33cbd6 URL: https://github.com/llvm/llvm-project/commit/ffacaa0beccbe318090be600f8d2d2c33c33cbd6 DIFF: https://github.com/llvm/llvm-project/commit/ffacaa0beccbe318090be600f8d2d2c33c33cbd6.diff

[PATCH] D125604: [FileCheck] Catch missspelled directives.

2022-05-14 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. A work in progress. Contains changes that we likely want to see addressed separately. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125604/new/ https://reviews.llvm.org/D125604

[PATCH] D125604: [FileCheck] Catch missspelled directives.

2022-05-14 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. Herald added subscribers: mattd, gchakrabarti, pmatos, asb, asavonic, wenlei, kerbowa, pengfei, Jim, asbirlea, thopre, rupprecht, george.burgess.iv, kbarton, hiraditya, jgravelle-google, sbc100, jvesely, nemanjai, dylanmckay, dschuff, jholewinski. Herald added a

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2022-05-14 Thread Sunil K via Phabricator via cfe-commits
koops added a comment. I have tried on x64 RH and x64 SuSe. I could not reproduce the failures seen on x64 debian. https://reviews.llvm.org/D118550 also has similar failures on x64 debian. There is a comment " I think the test failures are spurious (but not 100% sure)" So, are these failures

[PATCH] D124500: [clang-tidy] Support expressions of literals in modernize-macro-to-enum

2022-05-14 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang-tools-extra/unittests/clang-tidy/ModernizeModuleTest.cpp:210-214 +std::ostream <<(std::ostream , + const clang::tidy::test::Param ) { + return Str << "Matched: " << std::boolalpha << Value.Matched <<

[PATCH] D125580: Resolve overload ambiguity on Mac OS when printing size_t in diagnostics

2022-05-14 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac7a9ef0ae3a: Resolve overload ambiguity on Mac OS when printing size_t in diagnostics (authored by aaronpuchert). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] ac7a9ef - Resolve overload ambiguity on Mac OS when printing size_t in diagnostics

2022-05-14 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2022-05-14T12:37:36+02:00 New Revision: ac7a9ef0ae3a5c63dc4e641f9912d8b659ebd720 URL: https://github.com/llvm/llvm-project/commit/ac7a9ef0ae3a5c63dc4e641f9912d8b659ebd720 DIFF: https://github.com/llvm/llvm-project/commit/ac7a9ef0ae3a5c63dc4e641f9912d8b659ebd720.diff

[PATCH] D123878: [AMDGPU] Add remarks to output some resource usage

2022-05-14 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D123878#3506500 , @afanfa wrote: > If possible, I would like to keep some kind of delimiter. I like the idea of > having it at the beginning and at the end of the section. The best option > would be to convince clang to print

[PATCH] D124816: [LibTooling] use ToolFileManager to store file managers for each CWD

2022-05-14 Thread Shi Chen via Phabricator via cfe-commits
Kale added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:171-172 FileMgr->getFileSystemOpts().WorkingDir = std::string(WorkingDirectory); ScanInstance.setFileManager(FileMgr);

[PATCH] D124974: [clang] Include clang config.h in LangStandards.cpp

2022-05-14 Thread Cassie Jones via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2e2709479636: [clang] Include clang config.h in LangStandards.cpp (authored by porglezomp). Changed prior to commit: https://reviews.llvm.org/D124974?vs=429275=429416#toc Repository: rG LLVM Github

[clang] ae8bbc4 - [clang] Require including config.h for CLANG_DEFAULT_STD_C

2022-05-14 Thread Cassie Jones via cfe-commits
Author: Cassie Jones Date: 2022-05-14T01:48:14-07:00 New Revision: ae8bbc43f4709b910cd6c1e1ddc5bc854785a142 URL: https://github.com/llvm/llvm-project/commit/ae8bbc43f4709b910cd6c1e1ddc5bc854785a142 DIFF: https://github.com/llvm/llvm-project/commit/ae8bbc43f4709b910cd6c1e1ddc5bc854785a142.diff

[clang] 2e27094 - [clang] Include clang config.h in LangStandards.cpp

2022-05-14 Thread Cassie Jones via cfe-commits
Author: Cassie Jones Date: 2022-05-14T01:47:41-07:00 New Revision: 2e270947963659cf9db4099f42387144feb10fec URL: https://github.com/llvm/llvm-project/commit/2e270947963659cf9db4099f42387144feb10fec DIFF: https://github.com/llvm/llvm-project/commit/2e270947963659cf9db4099f42387144feb10fec.diff

[PATCH] D94727: [clangd] Retire some flags for uncontroversial, stable features.

2022-05-14 Thread Ivan Murashko via Phabricator via cfe-commits
ivanmurashko added inline comments. Herald added projects: clang-tools-extra, All. Comment at: clang-tools-extra/clangd/tool/ClangdMain.cpp:762 Opts.ResourceDir = ResourceDir; - Opts.BuildDynamicSymbolIndex = EnableIndex; + Opts.BuildDynamicSymbolIndex = true;

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-05-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Is there a specification or reference implementation stating that -E is used? > Option<["--", "/", "-"], "E", Do you need the prefix `--`? You may define something like `CLFlag`. I have missed previous patches, but if `/` options are not necessary, removing them will

[PATCH] D124974: [clang] Include clang config.h in LangStandards.cpp

2022-05-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. LGTM, thanks! One comment online below. Comment at: clang/include/clang/Config/config.h.cmake:19 #cmakedefine CLANG_DEFAULT_STD_C LangStandard::lang_${CLANG_DEFAULT_STD_C} +// Always #define something so that