[PATCH] D95479: [clang-format] Avoid considering include directive as a template closer.

2021-01-27 Thread Marek Kurdej 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 rGe3713f156b8c: [clang-format] Avoid considering include directive as a template closer. (authored by curdeius). Repository: rG LLVM Github Monorepo

[PATCH] D95479: [clang-format] Avoid considering include directive as a template closer.

2021-01-27 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a subscriber: tstellar. curdeius added a comment. @tstellar, could this be cherry-picked to 12.x branch? As noted above and discussed in D93839 , this fixes PR48891 bug that introduced an unintended change in behaviour o

[PATCH] D95229: [clangd] Treat optional field type mismatches as soft failures

2021-01-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Protocol.cpp:837 return false; + tryMap(Params, "triggerCharacter", R.triggerCharacter, P); R.triggerKind = static_cas

[PATCH] D95246: [SystemZ][z/OS] Fix No such file or directory expression error matching in lit tests - continued

2021-01-27 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. In D95246#2522913 , @abhina.sreeskantharajan wrote: > Please let me know if there are other guides I will need to update that I'm > not aware of. There's also the lit CommandGuide located at `llvm/docs/CommandGuide/lit.rst`.

[PATCH] D95347: [clang][cli] Port LangOpts to marshalling system, pt.2

2021-01-27 Thread Jan Svoboda 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 rGdfb558b82d3f: [clang][cli] Port LangOpts to marshalling system, pt.2 (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org

[PATCH] D95244: [clang][AST] Handle overload callee type in CallExpr::getCallReturnType.

2021-01-27 Thread Gabor Marton via Phabricator via cfe-commits
martong added reviewers: rsmith, majnemer. martong added subscribers: majnemer, rsmith. martong added a comment. Adding reviewers. @rsmith as code owner, @majnemer based on git blame of CallExpr::getCallReturnType. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D95439: [clangd] Add include-fixer fixit for field_incomplete_or_sizeless diagnostic.

2021-01-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 319492. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95439/new/ https://reviews.llvm.org/D95439 Files: clang-tools-extra/clangd/IncludeFixer.cpp clang-tools-extra/

[PATCH] D95439: [clangd] Add include-fixer fixit for field_incomplete_or_sizeless diagnostic.

2021-01-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tools-extra/clangd/IncludeFixer.cpp:81 case diag::err_func_def_incomplete_result: + case diag::err_field_incomplete_or_sizeless: // Incomplete type diagnostics should have a QualType

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 319493. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76802/new/ https://reviews.llvm.org/D76802 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-01-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D76802#2524039 , @MaskRay wrote: > - `__llvm_prf_cnts` does not need to have a self link `SHF_LINK_ORDER`. > `__llvm_prf_data` linking to `__llvm_prf_cnts` suffices. This is on the > premise that only `__llvm_prf_data` may refe

[PATCH] D95488: Itanium Mangling: In 'enable_if', omit X/E around .

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

[PATCH] D95487: Itanium Mangling: Fix handling of in .

2021-01-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:3912 +IsPrimaryExpr = false; + }; + I think it might be more reasonable to just check for the relatively small number of primary-expression cases in `mangleTemplateArgExpr` and skip

[PATCH] D93922: Itanium Mangling: Mangle `__alignof__` differently than `alignof`.

2021-01-27 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. This change looks good to me given the follow-up commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93922/new/ https://reviews.llvm.org/

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-01-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Ping^2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D94844: [VFS] Add support to RedirectingFileSystem for mapping a virtual directory to one in the external FS.

2021-01-27 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes updated this revision to Diff 319505. nathawes added a comment. - Updated the yaml for the new kind of virtual directory (that maps to a directory in the external filesystem) to have a distinct value for its 'type' field ('directory-remap') to better distinguish it from the existing 'd

[PATCH] D95061: [OpenCL][Docs] Moved information about internals from UsersManual into OpenCLSupport

2021-01-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Please build the docs and check the build log, as you might break some references? Comment at: clang/docs/UsersManual.rst:2951 address space map can be added using the :ref:`-ffake-address-space-map ` flag. Is this a dead refere

[PATCH] D95061: [OpenCL][Docs] Moved information about internals from UsersManual into OpenCLSupport

2021-01-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/docs/UsersManual.rst:2951 address space map can be added using the :ref:`-ffake-address-space-map ` flag. svenvh wrote: > Is this a dead reference now that you moved it to a different file? It is moved to

[PATCH] D95061: [OpenCL][Docs] Moved information about internals from UsersManual into OpenCLSupport

2021-01-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh accepted this revision. svenvh added a comment. This revision is now accepted and ready to land. LGTM then, thanks! Comment at: clang/docs/UsersManual.rst:2951 address space map can be added using the :ref:`-ffake-address-space-map ` flag. Anasta

[PATCH] D94476: [analyzer] Implement conversion from Clang diagnostics to PathDiagnostics.

2021-01-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 319513. NoQ marked 22 inline comments as done. NoQ added a comment. Address review comments! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94476/new/ https://reviews.llvm.org/D94476 Files: clang/include/clang/Analysis/PathDiagnosticConverterDiagnosti

[PATCH] D94476: [analyzer] Implement conversion from Clang diagnostics to PathDiagnostics.

2021-01-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > [Warning, Note, Remark, Warning, Remark] I excluded remarks for now with an assertion. Other tests added :) Comment at: clang/include/clang/Analysis/PathDiagnosticConverterDiagnosticConsumer.h:53-56 + /// Inform the consumer that the last diagnostic ha

[PATCH] D95403: [clang-tidy][analyzer][WIP] Clang-tidy reverse integration into Static Analyzer.

2021-01-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 319514. NoQ added a comment. Unforget to `git add` tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95403/new/ https://reviews.llvm.org/D95403 Files: clang/include/clang/Driver/Options.td clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.

[PATCH] D93630: [Attr] Apply GNU-style attributes to expression statements

2021-01-27 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 319516. vsavchenko added a comment. Herald added a subscriber: dexonsmith. Add extension for backward compatibility checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93630/new/ https://reviews.llvm.org/D9

[PATCH] D94844: [VFS] Add support to RedirectingFileSystem for mapping a virtual directory to one in the external FS.

2021-01-27 Thread Nathan Hawes via Phabricator via cfe-commits
nathawes marked 6 inline comments as done. nathawes added a comment. @JDevlieghere and @dexonsmith would you mind taking another look? I ended up changing the 'lookup' functions to drop the ExternalRedirect out param and supply that via a new 'LookupResult' return value that also gives the matc

[PATCH] D94596: [clang][AST] Encapsulate DeclarationNameLoc, NFCI

2021-01-27 Thread Mikhail Maltsev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG30d9ca1bd9de: [clang][AST] Encapsulate DeclarationNameLoc, NFCI (authored by miyuki). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94596/new/ https://revie

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-01-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @arnamoy10, thank you for this patch and for working on this! I have a few high-level suggestions (+ some inline comments): **Q1** `-module-dir` and `-J` in Options.td should be aliases - otherwise we need to duplicate some code. I've not used Aliases myself, but pe

[PATCH] D95472: clang-cl: Add /winsdkdir and /winsdkversion flags

2021-01-27 Thread Nico Weber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa5d85cbec58e: clang-cl: Add /winsdkdir and /winsdkversion flags (authored by thakis). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some members of CompilerInvocation store `StringRef`s pointing to the command line argume

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 319526. jansvoboda11 added a comment. Compare once and twice generated arguments, fix re-ordering of UserEntries Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Fi

[PATCH] D95516: [clang][cli] Benchmark command line round-trip

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: mgorny. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds a micro-benchmark for command line roun

[PATCH] D95061: [OpenCL][Docs] Moved information about internals from UsersManual into OpenCLSupport

2021-01-27 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd7cc3a083fce: [OpenCL][Docs] Moved info from UsersManual into OpenCLSupport. (authored by Anastasia). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D95061?vs=317943&id

[PATCH] D94865: [ASTMatchers] Add callOrConstruct matcher

2021-01-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2867 +extern const internal::MapAnyOfMatcher +callOrConstruct; + steveire wrote: > aaron.ballman wrote: > > steveire wrote: > > > aaron.ballman wrote: > > > > steve

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-27 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for working on this @FarisRehman ! I've left a few inline comments, but nothing major. Really nice to see this being added and working as expected! Comment at: clang/include/clang/Driver/Options.td:4074-4076 +def ffixed_line_length_VALUE :

[PATCH] D94627: [PowerPC][PC Rel] Implement option to omit P10 instructions from stubs

2021-01-27 Thread Stefan Pintilie via Phabricator via cfe-commits
stefanp added a comment. I have a few comments. Most of them are nits but there is a functional issue as well. For the testing: Do we have a test for the `PPC64R2SaveStub` in the situation where the offset fits in 34 bits? Comment at: lld/ELF/Driver.cpp:768 + // This handle

[PATCH] D95516: [clang][cli] Benchmark command line round-trip

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/benchmarks/CMakeLists.txt:3 + +target_link_libraries(CompilerInvocationBench + PRIVATE Not sure if we should do anything else here. I mostly cargo-culted this from clangd. Comment at: clan

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D94472#2523053 , @Bigcheese wrote: > The only issue I have with this if always parsing twice has a noticeable > performance impact for any users of Clang. Can we measure the impact? If it's > small (< 100ms ?) then that's

[PATCH] D95348: [clang][cli] Port OpenMP-related LangOpts to marshalling system

2021-01-27 Thread Jan Svoboda 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 rG9ad94c126aac: [clang][cli] Port OpenMP-related LangOpts to marshalling system (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHA

[PATCH] D95519: [clang-tidy] bugprone-assert-side-effect: Warn on NSAssert by default.

2021-01-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: alexfh, gribozavr2, vsavchenko. NoQ added a project: clang-tools-extra. Herald added subscribers: martong, Charusso, xazax.hun. NoQ requested review of this revision. This is basically standard Objective-C assert. While we could always pass it as an

[PATCH] D94802: [clang][cli] Parse HeaderSearch options separately

2021-01-27 Thread Jan Svoboda 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 rG05127fba4b66: [clang][cli] Parse HeaderSearch options separately (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D95519: [clang-tidy] bugprone-assert-side-effect: Warn on NSAssert by default.

2021-01-27 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. LGTM, but it would be great if code owners take a look as well. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95519/new/ https://reviews.llvm.org/D95519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-01-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:58 + +namespace { + Is there a need for the anonymous namespace? (We typically only use them when defining a class and try to make them as

[PATCH] D95519: [clang-tidy] bugprone-assert-side-effect: Warn on NSAssert by default.

2021-01-27 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! > I'm also interested in making an even more agressive step in this direction > and adding an option to accept any macro that ends with "...assert" suffix, > case-insensit

[PATCH] D94803: [clang][cli] Generate HeaderSearch options separately

2021-01-27 Thread Jan Svoboda 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 rGd0e8a9e5a2f0: [clang][cli] Generate HeaderSearch options separately (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/

[PATCH] D95246: [SystemZ][z/OS] Fix No such file or directory expression error matching in lit tests - continued

2021-01-27 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan updated this revision to Diff 319543. abhina.sreeskantharajan added a comment. I've changed the host check to use python's sys.platform to determine the host as an alternative to using LLVM_HOST_TRIPLE. It will save us the effort of making sure it's defined in all project

[PATCH] D95246: [SystemZ][z/OS] Fix No such file or directory expression error matching in lit tests - continued

2021-01-27 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan marked 2 inline comments as done. abhina.sreeskantharajan added inline comments. Comment at: llvm/utils/lit/lit/llvm/config.py:349-351 +triple = "" +if hasattr(self.config, 'host_triple'): +triple = self.config.host_triple -

[PATCH] D93585: [AArch64][Clang][Linux] Enable out-of-line atomics by default.

2021-01-27 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6448 + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("+outline-atomics"); +} This needs a Clang driver tests. Repository: rG LLVM Github Monorepo

[PATCH] D95166: Disable rosegment for old Android versions.

2021-01-27 Thread dmajor via Phabricator via cfe-commits
dmajor added a comment. Firefox has a build break from this change. In certain Android configurations we use bfd or gold. The statement in the commit message "Android only supports LLD" is news to me, could you point me to any references for this? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D95246: [SystemZ][z/OS] Fix No such file or directory expression error matching in lit tests - continued

2021-01-27 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan updated this revision to Diff 319547. abhina.sreeskantharajan added a comment. Fix CI: Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95246/new/ https://reviews.llvm.org/D95246 Files: clang/test/Driver/clang-offload

[PATCH] D95349: [clangd] Allow diagnostics to be suppressed with configuration

2021-01-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:319 -if (!CTChecks.empty()) { - ASTDiags.setLevelAdjuster([&CTContext](DiagnosticsEngine::Level DiagLevel, - const clang::Diagnostic &Info) {

[PATCH] D95439: [clangd] Add include-fixer fixit for field_incomplete_or_sizeless diagnostic.

2021-01-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang-tools-extra/clangd/IncludeFixer.cpp:81 case diag::err_func_def_incomplete_result: + case diag::err_field_incomplete_or_sizeless: // Incom

[PATCH] D95229: [clangd] Treat optional field type mismatches as soft failures

2021-01-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 319551. kadircet marked 2 inline comments as done. kadircet added a comment. - rename to mapOptOrNull - revert leftover changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95229/new/ https://reviews.llvm.or

[PATCH] D95229: [clangd] Treat optional field type mismatches as soft failures

2021-01-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Protocol.cpp:837 return false; + tryMap(Params, "triggerCharacter", R.triggerCharacter, P); R.triggerKind = static_cast(TriggerKind); sammccall wrote: > why are we no longer checking th

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-27 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. Looks sensible to me. Comment at: clang/test/SemaOpenCLCXX/members.cl:17 - -template struct remove_reference { typedef T type; }; -template struct remove_reference { typedef T type; }; I wonder, do we lose coverage by removing thes

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-01-27 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:58 + +namespace { + aaron.ballman wrote: > Is there a need for the anonymous namespace? (We typically only use them when > defining a class an

[PATCH] D95349: [clangd] Allow diagnostics to be suppressed with configuration

2021-01-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:319 -if (!CTChecks.empty()) { - ASTDiags.setLevelAdjuster([&CTContext](DiagnosticsEngine::Level DiagLevel, - const clang::Diagnostic &Info)

[PATCH] D95523: [OpenCL] Add cl_khr_subgroup_ballot to TableGen BIFs

2021-01-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added a subscriber: yaxunl. svenvh requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add the builtin functions brought by the `cl_khr_subgroup_ballot` extension to `-fde

[PATCH] D95487: Itanium Mangling: Fix handling of in .

2021-01-27 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:3912 +IsPrimaryExpr = false; + }; + rjmccall wrote: > I think it might be more reasonable to just check for the relatively small > number of primary-expression cases in `mangleTempl

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Can you include the use in the patch? I’m not sure having the AllocateString API totally makes sense, vs moving in a string pool that was independently used during generation, but maybe in context? I also wonder what command-line option is forcing this. Ideally we co

[PATCH] D95229: [clangd] Treat optional field type mismatches as soft failures

2021-01-27 Thread Kadir Cetinkaya 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 rGaf20232b8e18: [clangd] Treat "null" optional fields as missing (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D94466: [X86] merge "={eax}" and "~{eax}" into "=&eax" for MSInlineASM

2021-01-27 Thread Freddy, Ye via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1edb76cc91e7: [X86] merge "={eax}" and "~{eax}" into "=&eax" for MSInlineASM (authored by FreddyYe). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94466/new

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-01-27 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 319566. bader added a comment. Rebase patch on ToT and applied small refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files: clang/include/clang/AST/Type.h

[PATCH] D95526: [Syntax] Add syntax-tree-dump in clang-check.

2021-01-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a subscriber: mgorny. hokein requested review of this revision. Herald added a project: clang. This is useful to experiment/develop syntax trees. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95526

[PATCH] D95488: Itanium Mangling: In 'enable_if', omit X/E around .

2021-01-27 Thread James Y Knight via Phabricator via cfe-commits
jyknight updated this revision to Diff 319578. jyknight added a comment. Add neglected clang-abi-compat.cpp change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95488/new/ https://reviews.llvm.org/D95488 Files: clang/lib/AST/ItaniumMangle.cpp

[PATCH] D71016: [SYCL] Implement OpenCL kernel function generation

2021-01-27 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 319579. bader added a comment. Depends on D89909 Apply improvements developed in out-of-tree repository, which mostly are refactoring of SemaSYCL.cpp file. Rebase on ToT + D89909 (which only i

[PATCH] D95532: [clang][cli] Use variadic macros for parsing/generating

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch makes all macros forwarding to `PARSE_OPTION_WITH_MARSHALLING` and `GENERATE_O

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-27 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. Herald added subscribers: dang, pengfei. Herald added a reviewer: jansvoboda11. thakis requested review of this revision. On non-Windows platforms, --sysroot can be used to make the compiler use a single, hermetic directory for all heade

[PATCH] D93101: [Clang][Codegen] Truncate initializers of union bitfield members

2021-01-27 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas accepted this revision. pratlucas added a comment. This revision is now accepted and ready to land. The truncate conditions look a lot better and the test coverage seems reasonable now. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D95514#2525255 , @dexonsmith wrote: > Can you include the use in the patch? > I also wonder what command-line option is forcing this. The use-case that requires it is here: https://github.com/llvm/llvm-project/blob/f3449e

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Frontend/CompilerInvocation.h:144 + /// Container holding strings allocated during round-trip. + mutable std::forward_list AllocatedStrings; + dexonsmith wrote: > I suggest using llvm::StringPo

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/members.cl:17 - -template struct remove_reference { typedef T type; }; -template struct remove_reference { typedef T type; }; mantognini wrote: > I wonder, do we lose coverage by removing the

[PATCH] D77811: [clangd] WIP playing with semantic highlighting modifiers

2021-01-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 319591. sammccall added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Rebase, polish, add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77811/new/ https://

[PATCH] D95536: [clang][sema] Note decl location on missing member

2021-01-27 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, rsmith, rjmccall, rtrieu. Herald added subscribers: lxfind, jdoerfert. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Hi, when trying to access a member of a n

[PATCH] D77811: [clangd] Implement semanticTokens modifiers

2021-01-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 319592. sammccall retitled this revision from "[clangd] WIP playing with semantic highlighting modifiers" to "[clangd] Implement semanticTokens modifiers". sammccall edited the summary of this revision. sammccall added a comment. Update phab with commit mes

[PATCH] D95442: [OpenCL] Add diagnostics for references to functions

2021-01-27 Thread Marco Antognini via Phabricator via cfe-commits
mantognini accepted this revision. mantognini added a comment. This revision is now accepted and ready to land. Right, thanks for the explanations. They make sense. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95442/new/ https://reviews.llvm.org/D95442

[PATCH] D95016: [Clang][RISCV] Add custom TableGen backend for riscv-vector intrinsics.

2021-01-27 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 319488. khchen marked 21 inline comments as done. khchen added a comment. 1. address @jrtc27's comments. I really appreciate your help very much. 2. use downstream test generator and move all tests to rvv-intrinsics-generic and rvv-intrinsics. Repository:

[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Harmen Stoppels via Phabricator via cfe-commits
haampie added a comment. @JDevlieghere, would you care to review? This is another instance of moving away from system binaries to whatever the user / package manager wants the build to use. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95119/new/

[PATCH] D95016: [Clang][RISCV] Add custom TableGen backend for riscv-vector intrinsics.

2021-01-27 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/test/CodeGen/RISCV/riscv-rvv-intrinsics-generic/vadd.c:10 + +// ASM-NOT: warning +#include jrtc27 wrote: > Asm checks are discouraged in Clang. If you want to check for Clang warnings, > use -verify, and in this c

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-27 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Maybe we should just go with `Windows Kits/10" -- the space is only seen at the driver->cc1 boundary and it works fine there, and the 10 can be inferred from /winsdkversion. On the other hand, thinking about how to create such a sysroot directory, saying "just copy %vct

[PATCH] D77811: [clangd] Implement semanticTokens modifiers

2021-01-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 319594. sammccall added a comment. Tidy up, explain static Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77811/new/ https://reviews.llvm.org/D77811 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp cla

[PATCH] D95538: [clang][Format] Evaluate FallbackStyle only if needed

2021-01-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: MyDeveloperDay, curdeius. kadircet requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently getStyle() fails immediately if FallbackStyle is not a predefined style, even when it is

[PATCH] D95031: [clangd] Log warning when using legacy (theia) semantic highlighting.

2021-01-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D95031#2509896 , @nridge wrote: > Thanks for the heads up! It would be nice to get D77702 > landed before the removal of > `TheiaSemanticHighlighting`. I'll try to find some time to rebase i

[PATCH] D95526: [Syntax] Add syntax-tree-dump in clang-check.

2021-01-27 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/tools/clang-check/ClangCheck.cpp:141 +class BuildSyntaxTree : public clang::ASTFrontendAction { +public: DumpSyntaxTree since t

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX updated this revision to Diff 319602. ArcsinX added a comment. - Set `IdxContents` at `FileSymbols` object breation instead of at `FileSymbols::buildIndex()` call. - Revert change of the preamble index key scheme - Add comment for `IndexContents` - `IndexDataKind` => `IndexContents` Rep

[PATCH] D94952: [clangd] Take into account what is in the index (symbols, references, etc.) at indexes merge

2021-01-27 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX marked 4 inline comments as done. ArcsinX added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:433 PreambleSymbols.update( -Uri, std::make_unique(std::move(*IF->Symbols)), +FilePath ? *FilePath : (consumeError(FilePath.takeE

[PATCH] D95307: [StaticAnalyzer] Add checking for degenerate base class in MemRegion

2021-01-27 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 319607. RedDocMD added a comment. Removing duplication of CXXBaseSpecifiers when they are created for PointerToMember Removed hackish weakening of assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95307/new

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-27 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:613 + // settings. This allows the format to back up one level in those cases. + if (!AddLevel && Nam

[PATCH] D94827: [SimplifyCFG] If provided, preserve Dominator Tree

2021-01-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 319624. lebedev.ri retitled this revision from "[SimplifyCFG] Require and preserve dominator tree" to "[SimplifyCFG] If provided, preserve Dominator Tree". lebedev.ri edited the summary of this revision. lebedev.ri added a comment. Let me resell this. This

[PATCH] D93688: [ASTMatchers] Ensure that we can match inside lambdas

2021-01-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. This patch causes practically infinite traversal times on code that contains deeply nested lambdas. I'll try to get a suitable repro, but could you maybe revert this in the meantime? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-01-27 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-len2.cpp:10 + +void declaration(int Param, int Other); // NO-WARN: No chance to change this function. + aaron.ballman wrote: > I think

[PATCH] D91913: Suppress non-conforming GNU paste extension in all standard-conforming modes

2021-01-27 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment. @rnk Taking it upon yourself to revert this without approval and without communication on all branches, especially given the earlier suggestion by @rsmith to only revert this on the LLVM 12 branch, is an abuse of your commit privileges as far as I am concerned. Reposit

[PATCH] D94827: [SimplifyCFG] If provided, preserve Dominator Tree

2021-01-27 Thread Nikita Popov via Phabricator via cfe-commits
nikic accepted this revision. nikic 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/D94827/new/ https://reviews.llvm.org/D94827 ___ cfe

[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `#!/usr/bin/env perl -w` (2 arguments) unfortunately does not work on Linux and many other systems. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95119/new/ https://reviews.llvm.org/D95119

[PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Several `llvm/utils/` scripts can probably just be removed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95119/new/ https://reviews.llvm.org/D95119 ___ cfe-commits mailing list

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. > "Windows Kits/10" has the drawback that it contains a space and yet another > number. Ideally the contents of that directory would be available under some > short name, so I went with /winsdkdir /win_sdk. I'm not married to this > though. Maybe /WinSdk looks move lik

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D95514#2525517 , @jansvoboda11 wrote: > In D95514#2525255 , @dexonsmith > wrote: > >> Can you include the use in the patch? >> I also wonder what command-line option is forcing this.

[PATCH] D94827: [SimplifyCFG] If provided, preserve Dominator Tree

2021-01-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. @kuhar @mkazantsev wanna get in on the hype train? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94827/new/ https://reviews.llvm.org/D94827 ___ cfe-commits mailing list cfe-co

[PATCH] D94827: [SimplifyCFG] If provided, preserve Dominator Tree

2021-01-27 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar accepted this revision. kuhar added a comment. Choo choo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94827/new/ https://reviews.llvm.org/D94827 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D95487: Itanium Mangling: Fix handling of in .

2021-01-27 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: clang/lib/AST/ItaniumMangle.cpp:3912 +IsPrimaryExpr = false; + }; + jyknight wrote: > rjmccall wrote: > > I think it might be more reasonable to just check for the relatively small > > number of primary-expression

[PATCH] D91913: Suppress non-conforming GNU paste extension in all standard-conforming modes

2021-01-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D91913#2525993 , @hvdijk wrote: > @rnk Taking it upon yourself to revert this without approval and without > communication on all branches, especially given the earlier suggestion by > @rsmith to only revert this on the LLVM 12

[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

2021-01-27 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:13696 " }\n" - "break;\n" + " break;\n" "}\n" curdeius wrote: > MyDeveloperDay wrote: > > whilst I don'

[PATCH] D94987: DR39: Perform ambiguous subobject checks for class member access as part of object argument conversion, not as part of name lookup.

2021-01-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/CXXInheritance.h:77 - CXXBasePath() = default; + /// Additional data stashed on the base path by its consumers. + union { rjmccall wrote: > rsmith wrote: > > rjmccall wrote: > > > rsmith wrote

  1   2   3   >