[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-18 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp:23 -namespace { - -bool isCapsOnly(StringRef Name) { - return std::all_of(Name.begin(), Name.end(), [](const char C) { -if (std::isupper(C) ||

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2022-01-18 Thread Atmn Patel via Phabricator via cfe-commits
atmnpatel added inline comments. Comment at: openmp/libomptarget/DeviceRTL/CMakeLists.txt:231 + +compileDeviceRTLLibrary(x86_64 vgpu -target x86_64-vgpu -std=c++20 -stdlib=libc++ -I${devicertl_base_directory}/../plugins/vgpu/src) tianshilei1992 wrote: > It's

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2022-01-18 Thread Atmn Patel via Phabricator via cfe-commits
atmnpatel updated this revision to Diff 401112. atmnpatel marked 9 inline comments as done. atmnpatel added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113359/new/ https://reviews.llvm.org/D113359 Files:

[PATCH] D112408: [RISCV] Add the zve extension according to the v1.0 spec

2022-01-18 Thread Yueh-Ting Chen via Phabricator via cfe-commits
eopXD added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoV.td:1499 foreach nf=2-8 in { +// Vector Unit-strided Segment Instructions +def VLSEG#nf#E64_V : craig.topper wrote: > The unit-stride and strided with EEW=64 don't require

[PATCH] D117262: [NFC] Store Address's alignment into PointerIntPairs

2022-01-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/CodeGen/Address.h:30 + // Int portion stores lower 3 bits of the log of the alignment. + llvm::PointerIntPair ElementType; aeubanks wrote: > nikic wrote: > > Are we guaranteed 3 bits even on 32-bit

[PATCH] D117567: [clang][dataflow] Add a test to justify skipping past references in UO_Deref

2022-01-18 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added a comment. Thanks for sharing this. I reverted the patch and will look at why it fails on Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117567/new/ https://reviews.llvm.org/D117567

[clang] a026204 - Revert "[clang][dataflow] Add a test to justify skipping past references in UO_Deref"

2022-01-18 Thread Stanislav Gatev via cfe-commits
Author: Stanislav Gatev Date: 2022-01-19T06:46:37Z New Revision: a0262043bb87fdef68c817722de320a5dd9eb9c9 URL: https://github.com/llvm/llvm-project/commit/a0262043bb87fdef68c817722de320a5dd9eb9c9 DIFF: https://github.com/llvm/llvm-project/commit/a0262043bb87fdef68c817722de320a5dd9eb9c9.diff

[PATCH] D112408: [RISCV] Add the zve extension according to the v1.0 spec

2022-01-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoV.td:1499 foreach nf=2-8 in { +// Vector Unit-strided Segment Instructions +def VLSEG#nf#E64_V : The unit-stride and strided with EEW=64 don't require RV64. Just the

[PATCH] D117262: [NFC] Store Address's alignment into PointerIntPairs

2022-01-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/lib/CodeGen/Address.h:30 + // Int portion stores lower 3 bits of the log of the alignment. + llvm::PointerIntPair ElementType; nikic wrote: > Are we guaranteed 3 bits even on 32-bit architectures? Apparently

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood updated this revision to Diff 401087. LegalizeAdulthood added a comment. - For function `isCapsOnly`: - Declare as static per LLVM style guide - Simplify boolean expression - Use `llvm::all_of` on container - Inline Function `isLiteralTokenSequence` as it is now simpler

[PATCH] D117120: [Doc] Add documentation for the clang-offload-wrapper tool (NFC)

2022-01-18 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev accepted this revision. sdmitriev added a comment. This revision is now accepted and ready to land. Looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117120/new/ https://reviews.llvm.org/D117120

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-18 Thread psigillito via Phabricator via cfe-commits
psigillito added a comment. Ok, as I was starting to add a new language, the scope of changes just continued to grow. If you think it is worthwhile, I think I can fix this edge case for accessSpecifiers by cleaning up my old approach and adding some tests. I dont like having to add a big set

[PATCH] D117468: [RISCV] Add intrinsic for Zbt extension

2022-01-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Out of curiosity, what is your interest in Zbt? Do you work for a company that is implementing this extension in hardware? Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4246 + case Intrinsic::riscv_fsl: +return

[PATCH] D117567: [clang][dataflow] Add a test to justify skipping past references in UO_Deref

2022-01-18 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This breaks tests on windows: http://45.33.8.238/win/52841/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117567/new/

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-01-18 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Hi @pcc, does this make sense to you? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115844/new/ https://reviews.llvm.org/D115844 ___ cfe-commits mailing list

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-01-18 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D114732#3253142 , @devin.jeanpierre wrote: > OK, while I'm struggling to set up a new Windows machine so I can make sure > this works on Windows... @Quuxplusone, after this is merged, do you want to > rebase D67524

[PATCH] D117626: [ADT] [NFC] Add StringRef::detectEOL

2022-01-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 401074. beanz added a comment. Fixing the CR test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117626/new/ https://reviews.llvm.org/D117626 Files: clang/lib/Frontend/Rewrite/InclusionRewriter.cpp

[PATCH] D5980: unique_ptrify ownership of ModuleFiles in the ModuleManager

2022-01-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie abandoned this revision. dblaikie added a subscriber: dexonsmith. dblaikie added a comment. Herald added a subscriber: yaxunl. Looks like @dexonsmith got this (putting the ownership in `Chain` & using some iterator adapters to narrow the cleanup scope/fallout) in

[PATCH] D117626: [ADT] [NFC] Add StringRef::detectEOL

2022-01-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 401071. beanz added a comment. Minor fix to properly handle classic mac... because it is _very_ important. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117626/new/ https://reviews.llvm.org/D117626 Files:

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-18 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 401062. ksyx marked 2 inline comments as done. ksyx edited the summary of this revision. ksyx added a comment. - Resolves formatting conflict with options `EmptyLineAfterAccessModifier` and `EmptyLineBeforeAccessModifier` (prompts with `--dry-run` (`-n`) or

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-01-18 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre added a comment. OK, while I'm struggling to set up a new Windows machine so I can make sure this works on Windows... @Quuxplusone, after this is merged, do you want to rebase D67524 on top of this, or should I? I can review it -- I think

[PATCH] D117529: [clangd][NFC] Cache ClangTidy check globs to speed up createChecks

2022-01-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Happy to take a look at this, but is there a particular motive for optimizing this? Looking at some profiles this appears to be something like 0.1-0.5ms in fairly complex configurations. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:289 +//

[PATCH] D117626: [ADT] [NFC] Add StringRef::detectEOL

2022-01-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: rnk, jyknight, dexonsmith. beanz requested review of this revision. Herald added projects: clang, LLVM. This change moves EOL detection out of the clang::InclusionRewriter into llvm::StringRef so that it can be easily reused elsewhere. It also

[PATCH] D117419: [clang][cmake] Use `GNUInstallDirs` to support custom installation dirs

2022-01-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/CMakeLists.txt:3 +include(GNUInstallDirs) + If GNUInstallDirs is included before the `project` call enables languages it results in a CMake warning being logged. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D114732: [clang] Mark `trivial_abi` types as "trivially relocatable".

2022-01-18 Thread Devin Jeanpierre via Phabricator via cfe-commits
devin.jeanpierre updated this revision to Diff 401035. devin.jeanpierre added a comment. Update to pass on Windows (untested right now). On Windows, unlike Itanium ABI, the only special member functions used are the copy constructor and the destructor. If the copy constructor is deleted, then

[libunwind] b6a9396 - [NFC][libunwind] Fix uintptr_t vs size_t confusion for lengths

2022-01-18 Thread Jessica Clarke via cfe-commits
Author: Jessica Clarke Date: 2022-01-19T00:05:30Z New Revision: b6a93967d9c11e79802b5e75cec1584d6c8aa472 URL: https://github.com/llvm/llvm-project/commit/b6a93967d9c11e79802b5e75cec1584d6c8aa472 DIFF: https://github.com/llvm/llvm-project/commit/b6a93967d9c11e79802b5e75cec1584d6c8aa472.diff

[PATCH] D117622: cleanups from 1b1c8d83d3567a60280291c0adb95d1d60335509

2022-01-18 Thread Kevin Athey via Phabricator via cfe-commits
kda updated this revision to Diff 401028. kda added a comment. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. remove "-s" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117622/new/ https://reviews.llvm.org/D117622

[PATCH] D117622: cleanups from 1b1c8d83d3567a60280291c0adb95d1d60335509

2022-01-18 Thread Kevin Athey via Phabricator via cfe-commits
kda created this revision. kda added a reviewer: vitalybuka. kda requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. fixing up some comments and removing redundant tests. Repository: rG LLVM Github Monorepo

[PATCH] D117056: [clangd] Properly compute framework-style include spelling

2022-01-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Nice! Comment at: clang-tools-extra/clangd/index/SymbolCollector.cpp:197 + llvm::StringMap CachePathToFrameworkSpelling; + llvm::StringMap CacheFrameworkToUmbrellaInclude; ...ToUmbrellaHeaderSpelling? (Unclear to me what values

[clang] ca6c9e4 - [OpenMP] Remove hidden visibility for declare target variables

2022-01-18 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-01-18T18:19:57-05:00 New Revision: ca6c9e43ea9ca6b752d4302d692d29e311480da5 URL: https://github.com/llvm/llvm-project/commit/ca6c9e43ea9ca6b752d4302d692d29e311480da5 DIFF: https://github.com/llvm/llvm-project/commit/ca6c9e43ea9ca6b752d4302d692d29e311480da5.diff

[PATCH] D117600: [CGCall] Annotate operator new with inaccessiblememonly if AssumeSaneOperatorNew is on

2022-01-18 Thread Bryce Wilson via Phabricator via cfe-commits
Bryce-MW created this revision. Bryce-MW edited the summary of this revision. Bryce-MW retitled this revision from "[CGCall] Annotate op new with inaccessiblememonly if AssumeSaneOperatorNew is on" to "[CGCall] Annotate operator new with inaccessiblememonly if AssumeSaneOperatorNew is on".

[PATCH] D117616: GCC ABI Compatibility: Preserve alignment of non-pod members in packed structs

2022-01-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. dblaikie added reviewers: rnk, rjmccall, rsmith. dblaikie requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This matches GCC: https://godbolt.org/z/sM5q95PGY I realize this is an API break for clang+clang -

[PATCH] D117461: [clangd] IncludeCleaner: Attach "insert prgama keep" fix-it to diagnostic

2022-01-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Nice! Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:212 + clangd::Range Result; + Result.end = Result.start = offsetToPosition(Code, HashOffset); + I think we should be a bit more direct about the *content* that we're

[PATCH] D117419: [clang][cmake] Use `GNUInstallDirs` to support custom installation dirs

2022-01-18 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 updated this revision to Diff 401001. Ericson2314 added a comment. Fix bug Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117419/new/ https://reviews.llvm.org/D117419 Files: clang/CMakeLists.txt clang/cmake/modules/AddClang.cmake

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. In D116386#3252351 , @carlosgalvezp wrote: > Would it be worth mentioning the change in the release notes? [...] Updating the documentation based on the discussion thread and the release notes are both good ideas,

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-18 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:1807 +TEST_P(ASTMatchersTest, IsConsteval_MatchesIfConsteval) { + if (!GetParam().isCXX20OrLater()) { +return; Actually `if consteval` is a C++23 feature, but

[PATCH] D93164: [AST] Add generator for source location introspection

2022-01-18 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D93164#3252509 , @lancethepants wrote: > In D93164#3250945 , @andrew-wja > wrote: > >> In D93164#3048130 , @lancethepants >> wrote: >> >>> In

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-18 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added a reviewer: aaron.ballman. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Support C++20 `consteval` functions and C++2b `if consteval` for AST Matchers. Repository: rG LLVM Github

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-18 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2535 ArgAttrs[FirstIRArg + i] = llvm::AttributeSet::get(getLLVMContext(), Attrs); } ab wrote: > Hmm, if I'm reading this right, this overwrites the `nonnull

[PATCH] D117475: [clangd] NFC, emit source ranges in selection debug messages.

2022-01-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:473 printNodeKind(OS, N); - OS << " "; + OS << " " << N.getSourceRange().printToString(SM) << " "; return std::move(OS.str()); I don't think this belongs in

[PATCH] D117348: [Preprocessor] Reduce the memory overhead of `#define` directives

2022-01-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Lex/MacroInfo.cpp:33 + +// MacroInfo is expected to take 40 bytes on platforms with an 8 byte pointer. +template class MacroInfoSizeChecker { aaron.ballman wrote: > Should we do this dance for 32-bit

[PATCH] D116174: [clang] support relative roots to vfs overlays

2022-01-18 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 400983. rmaz added a comment. Rebase on stable commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116174/new/ https://reviews.llvm.org/D116174 Files: clang/test/VFS/Inputs/vfsoverlay-root-relative.yaml

[PATCH] D117605: [time-trace] Add optimizer and codegen regions to NPM

2022-01-18 Thread Wei Wang via Phabricator via cfe-commits
weiwang created this revision. Herald added subscribers: ormris, hoy, wenlei. weiwang requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Optimizer and codegen regions were only added to legacy PM. Add them to NPM as well. Repository: rG

[PATCH] D117603: [clang] Don't typo-fix an expression in a SFINAE context

2022-01-18 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Quuxplusone added reviewers: ldionne, rsmith, leonardchan, mizvekov. Quuxplusone added a project: clang. Quuxplusone requested review of this revision. Herald added a subscriber: cfe-commits. If this is a SFINAE context, then continuing to look up names (in

[PATCH] D117568: [Analyzer] Add docs to StdCLibraryFunctionArgsChecker

2022-01-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/docs/analyzer/checkers.rst:2361 +(void)ret; +clang_analyzer_eval(EOF <= x && x <= 255); // this reports TRUE + } I recommend against using `clang_analyzer_eval` in user docs. Users aren't expected to know

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-18 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2535 ArgAttrs[FirstIRArg + i] = llvm::AttributeSet::get(getLLVMContext(), Attrs); } Hmm, if I'm reading this right, this overwrites the `nonnull dereferenceable align`

[PATCH] D117262: [NFC] Store Address's alignment into PointerIntPairs

2022-01-18 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/lib/CodeGen/Address.h:45 +auto AlignLog = llvm::Log2_64(alignment.getQuantity()); +assert(AlignLog < (1 << 6) && "cannot fit alignment into 6 bits"); +Pointer.setInt(AlignLog >> 3); nikic wrote: > Why

[PATCH] D117262: [NFC] Store Address's alignment into PointerIntPairs

2022-01-18 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/lib/CodeGen/Address.h:30 + // Int portion stores lower 3 bits of the log of the alignment. + llvm::PointerIntPair ElementType; Are we guaranteed 3 bits even on 32-bit architectures? Comment

[PATCH] D93164: [AST] Add generator for source location introspection

2022-01-18 Thread Lance Fredrickson via Phabricator via cfe-commits
lancethepants added a comment. In D93164#3048130 , @lancethepants wrote: > In D93164#2653067 , @mgorny wrote: > >> This change breaks cross-compilation now, as it tries running an executable >> built for the

[PATCH] D117262: [NFC] Store Address's alignment into PointerIntPairs

2022-01-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. # no asserts, no debuginfo, -O3 $ du -b clang-stable clang-patched 83539528clang-stable 83528456clang-patched clang's code size actually goes down with this patch llvm-compile-time-tracker:

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-01-18 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. What's the status of this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53847/new/ https://reviews.llvm.org/D53847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D117567: [clang][dataflow] Add a test to justify skipping past references in UO_Deref

2022-01-18 Thread Stanislav Gatev 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 rG68226e572f41: [clang][dataflow] Add a test to justify skipping past references in UO_Deref (authored by sgatev). Repository: rG LLVM Github

[clang] 68226e5 - [clang][dataflow] Add a test to justify skipping past references in UO_Deref

2022-01-18 Thread Stanislav Gatev via cfe-commits
Author: Stanislav Gatev Date: 2022-01-18T21:27:43Z New Revision: 68226e572f41105446413b12ee95ab5540b2b6ac URL: https://github.com/llvm/llvm-project/commit/68226e572f41105446413b12ee95ab5540b2b6ac DIFF: https://github.com/llvm/llvm-project/commit/68226e572f41105446413b12ee95ab5540b2b6ac.diff

[PATCH] D107275: [Sema] a[x] has type T when a has type T* or T[], even when T is dependent

2022-01-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @kadircet What we forgot to think about here is that this allows more semantic checks to happen at template parsing time, which affects diagnostics. This is OK (in fact good) as if those checks fail the template cannot be instantiated, and the code is IFNDR. But I

[clang] 4777eb2 - [Sema] Add test for new errors due to 09f8315bba391

2022-01-18 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-01-18T22:18:35+01:00 New Revision: 4777eb2954080864bcf9dfca0e828c637268eb13 URL: https://github.com/llvm/llvm-project/commit/4777eb2954080864bcf9dfca0e828c637268eb13 DIFF: https://github.com/llvm/llvm-project/commit/4777eb2954080864bcf9dfca0e828c637268eb13.diff

[PATCH] D117567: [clang][dataflow] Add a test to justify skipping past references in UO_Deref

2022-01-18 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added a comment. I also think that we should prefer checking instantiations. We have a single Clang-Tidy check that works on templates and I believe this is the only special support that it needs. We can revisit that later and remove this support if it proves to be unnecessary.

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-18 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp:85 + +bool isLiteralTokenSequence(const MacroInfo *Info) { + return std::all_of(Info->tokens_begin(), Info->tokens_end(), LLVM coding standards

[PATCH] D113359: [Libomptarget][WIP] Introduce VGPU Plugin

2022-01-18 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/DeviceRTL/src/Kernel.cpp:127 +#pragma omp begin declare variant match( \ +device = {kind(cpu)}, implementation = {extension(match_any)}) tianshilei1992

[PATCH] D114379: [OMPIRBuilder] Add support for simd (loop) directive.

2022-01-18 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 400958. arnamoy10 added a comment. Making any_of one-liner. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114379/new/ https://reviews.llvm.org/D114379 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/OpenMP/irbuilder_simd.cpp

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-18 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Code looks great! Would it be worth mentioning the change in the release notes? I also wonder if the check documentation needs some updates. From what i read in the discussion this rule has poor enforcement in the guidelines so perhaps it's good to clarify what

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-18 Thread ksyx via Phabricator via cfe-commits
ksyx added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:80 return; Whitespaces.replaceWhitespace(*TargetToken, NewlineToInsert, +TargetToken->OriginalColumn, HazardyKnusperkeks

[PATCH] D7982: [clang-tidy] Add readability-duplicate-include check

2022-01-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. 2nd. ping. Still waiting for a review on this check. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7982/new/ https://reviews.llvm.org/D7982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D116386: [clang-tidy] Narrow cppguidelines-macro-usage to actual constants

2022-01-18 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Ping again. This change isn't that long or complicated and fixes a bug that results in false positives from this check. Please give it a review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116386/new/ https://reviews.llvm.org/D116386

[PATCH] D113863: [clang-tidy] Make `readability-container-data-pointer` more robust

2022-01-18 Thread Fabian Wolff via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf7b7138a6264: [clang-tidy] Make `readability-container-data-pointer` more robust (authored by fwolff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang-tools-extra] f7b7138 - [clang-tidy] Make `readability-container-data-pointer` more robust

2022-01-18 Thread Fabian Wolff via cfe-commits
Author: Fabian Wolff Date: 2022-01-18T21:08:59+01:00 New Revision: f7b7138a62648f4019c55e4671682af1f851f295 URL: https://github.com/llvm/llvm-project/commit/f7b7138a62648f4019c55e4671682af1f851f295 DIFF: https://github.com/llvm/llvm-project/commit/f7b7138a62648f4019c55e4671682af1f851f295.diff

[PATCH] D117549: [clangd] Sort targets before printing for tests

2022-01-18 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang-tools-extra/clangd/FindTarget.cpp:1174 bool First = true; + if (!R.Targets.empty()) { +const auto =

[PATCH] D117529: [clangd][NFC] Cache ClangTidy check globs to speed up createChecks

2022-01-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D117529#3251949 , @carlosgalvezp wrote: > Haven't looked much in detail so apologies if my comment is stupid - can't > CachedGlobList be used for this purpose? Should be a one-liner change I think. Not a stupid question,

[clang] 8fc24de - Revert "[OpenMP] Remove hidden visibility for declare target variables"

2022-01-18 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-01-18T14:44:11-05:00 New Revision: 8fc24de93f9def64c3ffa72f5235f23e9d761847 URL: https://github.com/llvm/llvm-project/commit/8fc24de93f9def64c3ffa72f5235f23e9d761847 DIFF: https://github.com/llvm/llvm-project/commit/8fc24de93f9def64c3ffa72f5235f23e9d761847.diff

[PATCH] D117416: [clang-format] Handle C variables with name that matches c++ access specifier

2022-01-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D117416#3250415 , @MyDeveloperDay wrote: > I'm not a fan of this approach of adding a "C" language, mainly because of > the `.h` problem so ultimately it doesn't solve your problem. > > I think this is overkill

[PATCH] D117593: [clang-tidy] Change google-explicit-constructor to ignore conversions and operators marked `explicit(false)`

2022-01-18 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: alexfh, aaron.ballman, LegalizeAdulthood. Herald added subscribers: carlosgalvezp, xazax.hun. njames93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. These

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-18 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D105169#3248124 , @sammccall wrote: > Ah, this seems to be coming from the buildbot configuration. > >

[PATCH] D117520: [clang-format] Fix SeparateDefinitionBlocks issues

2022-01-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:76 // Do not handle EOF newlines. if (TargetToken->is(tok::eof) && NewlineToInsert > 0) return; Is that needed? Comment

[PATCH] D108453: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default (2)

2022-01-18 Thread Kevin Athey via Phabricator via cfe-commits
kda added a comment. Herald added subscribers: luke957, asavonic. Breaks sanitizer buildbots: https://lab.llvm.org/buildbot/#/builders/5/builds/17422 (fast) AND https://lab.llvm.org/buildbot/#/builders/74/builds/8849 (MSAN) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117529: [clangd][NFC] Cache ClangTidy check globs to speed up createChecks

2022-01-18 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Haven't looked much in detail so apologies if my comment is stupid - can't CachedGlobList be used for this purpose? Should be a one-liner change I think. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117529/new/

[PATCH] D114564: Fix the use of -fno-approx-func along with -Ofast or -ffast-math

2022-01-18 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor accepted this revision. andrew.w.kaylor added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2760 case options::OPT_fno_honor_nans: HonorNaNs = false;break; case

[PATCH] D112221: Mark ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT as deprecated

2022-01-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in 0d459444e5105d689e6388612784b89a93054944 , thanks all for the helpful reviews! CHANGES SINCE LAST ACTION

[clang] 0d45944 - Mark ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT as deprecated

2022-01-18 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-01-18T13:41:56-05:00 New Revision: 0d459444e5105d689e6388612784b89a93054944 URL: https://github.com/llvm/llvm-project/commit/0d459444e5105d689e6388612784b89a93054944 DIFF: https://github.com/llvm/llvm-project/commit/0d459444e5105d689e6388612784b89a93054944.diff

[PATCH] D117587: [ifs] Use a tmp file instead of -

2022-01-18 Thread Jake Egan via Phabricator via cfe-commits
Jake-Egan created this revision. Jake-Egan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D117587 Files: clang/test/InterfaceStubs/object.c Index:

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-01-18 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Gentle ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116203/new/ https://reviews.llvm.org/D116203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D117129: [clang-tidy] Extract Class IncluderClangTidyCheck

2022-01-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D117129#3251705 , @njames93 wrote: > In D117129#3251577 , @aaron.ballman > wrote: > >> In D117129#3246403 , @njames93 >> wrote: >> >>>

[PATCH] D117129: [clang-tidy] Extract Class IncluderClangTidyCheck

2022-01-18 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D117129#3251577 , @aaron.ballman wrote: > In D117129#3246403 , @njames93 > wrote: > >> There is a hurdle to overcome with this, Currently each check can have its >> own include

[PATCH] D117579: Add assert on End iteration distance to Rewriter::getRewrittenText.

2022-01-18 Thread ahedberg via Phabricator via cfe-commits
ahedberg created this revision. ahedberg requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I currently have code that is crashing in the second std::advance call, and it was not straightforward to identify the problem, as the first line of

[PATCH] D116174: [clang] support relative roots to vfs overlays

2022-01-18 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 400894. rmaz added a comment. Windows test fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116174/new/ https://reviews.llvm.org/D116174 Files: clang/test/VFS/Inputs/vfsoverlay-root-relative.yaml

[PATCH] D113863: [clang-tidy] Make `readability-container-data-pointer` more robust

2022-01-18 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113863/new/ https://reviews.llvm.org/D113863 ___ cfe-commits mailing

[PATCH] D117529: [clangd][NFC] Cache ClangTidy check globs to speed up createChecks

2022-01-18 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 400893. njames93 added a comment. Herald added a subscriber: carlosgalvezp. Pre-allocate both vectors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117529/new/ https://reviews.llvm.org/D117529 Files:

[PATCH] D117362: [OpenMP] Remove hidden visibility for declare target variables

2022-01-18 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 rGd081bfcd17c1: [OpenMP] Remove hidden visibility for declare target variables (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D117320: [OpenMP] Mark device RTL variables as hidden

2022-01-18 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 rGdcb83b236421: [OpenMP] Mark device RTL variables as hidden (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] d081bfc - [OpenMP] Remove hidden visibility for declare target variables

2022-01-18 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-01-18T12:53:20-05:00 New Revision: d081bfcd17c1c704776a0964d239f19f6acde93d URL: https://github.com/llvm/llvm-project/commit/d081bfcd17c1c704776a0964d239f19f6acde93d DIFF: https://github.com/llvm/llvm-project/commit/d081bfcd17c1c704776a0964d239f19f6acde93d.diff

[clang] dcb83b2 - [OpenMP] Mark device RTL variables as hidden

2022-01-18 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-01-18T12:53:17-05:00 New Revision: dcb83b236421d5a4d6e767ee43ae1cdab5fce0f2 URL: https://github.com/llvm/llvm-project/commit/dcb83b236421d5a4d6e767ee43ae1cdab5fce0f2 DIFF: https://github.com/llvm/llvm-project/commit/dcb83b236421d5a4d6e767ee43ae1cdab5fce0f2.diff

[PATCH] D117468: [RISCV] Add intrinsic for Zbt extension

2022-01-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4246 + case Intrinsic::riscv_fsl: +return DAG.getNode(RISCVISD::FSL, DL, XLenVT, Op.getOperand(1), + Op.getOperand(2), Op.getOperand(3));

[PATCH] D116514: [clangd] Add code action to generate a constructor for a C++ class

2022-01-18 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp:26-28 +// struct S { +// S(int x, unique_ptr y) : x(x), y(std::move(y)) {} +// }; njames93 wrote: > avogelsgesang wrote: > > ``` > > //

[PATCH] D117129: [clang-tidy] Extract Class IncluderClangTidyCheck

2022-01-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D117129#3246403 , @njames93 wrote: > In D117129#3239514 , > @LegalizeAdulthood wrote: > >> In D117129#3239143 , @njames93 >> wrote: >>

[PATCH] D116514: [clangd] Add code action to generate a constructor for a C++ class

2022-01-18 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/MemberwiseConstructor.cpp:49 + Class = N->ASTNode.get(); +if (!Class || !Class->isThisDeclarationADefinition() || Class->isUnion()) + return false; njames93

[PATCH] D117348: [Preprocessor] Reduce the memory overhead of `#define` directives

2022-01-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Just some minor nits from me, but generally LG. Comment at: clang/include/clang/Lex/MacroInfo.h:243 - using tokens_iterator = SmallVectorImpl::const_iterator; + using tokens_iterator = const Token *; + I think this should be

[PATCH] D117567: [clang][dataflow] Add a test to justify skipping past references in UO_Deref

2022-01-18 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Is it planned to support templated code this way? I'm not entirely sure if this is worth pursuing as opposed to checking instantiations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117567/new/

[PATCH] D117120: [Doc] Add documentation for the clang-offload-wrapper tool (NFC)

2022-01-18 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. Ping :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117120/new/ https://reviews.llvm.org/D117120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 262cc74 - Fix pair construction with an implicit constructor inside.

2022-01-18 Thread Tres Popp via cfe-commits
Author: Tres Popp Date: 2022-01-18T18:01:52+01:00 New Revision: 262cc74e0b699071ff3e2627140b02d01ae2aa7e URL: https://github.com/llvm/llvm-project/commit/262cc74e0b699071ff3e2627140b02d01ae2aa7e DIFF: https://github.com/llvm/llvm-project/commit/262cc74e0b699071ff3e2627140b02d01ae2aa7e.diff

[PATCH] D117560: [C++20][Concepts] Fix a failed assertion on an invalid typename requirement

2022-01-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in fa596fb0779ae9029edbcff80ff95e9d1a816206 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117119: [clangd][clang-tidy] Remove uses of `std::vector`

2022-01-18 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc6fb636667b8: [clangd][clang-tidy] Remove uses of `std::vectorbool` (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117119/new/

[clang-tools-extra] c6fb636 - [clangd][clang-tidy] Remove uses of `std::vector`

2022-01-18 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2022-01-18T17:59:40+01:00 New Revision: c6fb636667b879bfc8329d2c9ca5873871b46a7b URL: https://github.com/llvm/llvm-project/commit/c6fb636667b879bfc8329d2c9ca5873871b46a7b DIFF: https://github.com/llvm/llvm-project/commit/c6fb636667b879bfc8329d2c9ca5873871b46a7b.diff

  1   2   >