[PATCH] D31343: Add an attribute plugin example

2020-03-02 Thread John Brawn via Phabricator via cfe-commits
john.brawn updated this revision to Diff 247683. john.brawn added a comment. Rebased and added link in documentation. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31343/new/ https://reviews.llvm.org/D31343 Files: clang/docs/ClangPlugins.rst clang/examples/Attribute/Attribute.cpp

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm added a comment. In D75402#1901361 , @hliao wrote: > BTW, why that variable cannot have an initializer? Suppose that initializer > is a trivial one, initializing to 0, would that cause any issue in the > compilation? Initialization makes the

[PATCH] D31342: Add ParsedAttrInfo::handleDeclAttribute

2020-03-02 Thread John Brawn via Phabricator via cfe-commits
john.brawn updated this revision to Diff 247681. john.brawn added a comment. Update based on review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31342/new/ https://reviews.llvm.org/D31342 Files: clang/docs/ClangPlugins.rst clang/docs/InternalsManual.rst

[PATCH] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'm playing with a prototype of the token-based approach, a couple of follow-ups from that. I've split out functions to handle file/macro/ast from locateSymbolAt in e7de00cf974a4e30d4900518ae8473a117efbd6c

[PATCH] D31342: Add ParsedAttrInfo::handleDeclAttribute

2020-03-02 Thread John Brawn via Phabricator via cfe-commits
john.brawn marked 6 inline comments as done. john.brawn added inline comments. Comment at: clang/docs/ClangPlugins.rst:89 +The members of ``ParsedAttrInfo`` that a plugin attribute must define are: + * ``AttrKind``, which must be set to ``ParsedAttr::NoSemaHandlerAttribute``. +

[PATCH] D75469: Add C standard upgrade in clang-11 release note

2020-03-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm with comment Comment at: clang/docs/ReleaseNotes.rst:551 + +- The following release of clang (clang-11) will upgrade the default C language + standard used if not

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm marked an inline comment as done. hsmhsm added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); hliao wrote: > hsmhsm wrote: > > yaxunl wrote:

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. BTW, why that variable cannot have an initializer? Suppose that initializer is a trivial one, initializing to 0, would that cause any issue in the compilation? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75402/new/

[PATCH] D75423: [OpenCL] Mark pointers to constant address space as invariant

2020-03-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D75423#1901348 , @yaxunl wrote: > In D75423#1901254 , @rjmccall wrote: > > > In D75423#1901206 , @hliao wrote: > > > > > invariant checking

[PATCH] D75383: clang: Switch C compilations to C17 by default.

2020-03-02 Thread Nick Desaulniers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG91cdbd521a38: clang: Switch C compilations to C17 by default. (authored by nickdesaulniers). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75383/new/

[PATCH] D74500: clang: Treat ieee mode as the default for denormal-fp-math

2020-03-02 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74500/new/ https://reviews.llvm.org/D74500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm marked an inline comment as done. hsmhsm added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); yaxunl wrote: > hliao wrote: > > This check

[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

2020-03-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:932 + const CXXConstructExpr *getInheritingConstructor() const { +return cast(getInheritingStackFrame()->getCallSite()); + } This line causes a

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); hsmhsm wrote: > yaxunl wrote: > > hliao wrote: > > > This check should be removed

Re: [PATCH] D73852: [clang] detect switch fallthrough marked by a comment (PR43465)

2020-03-02 Thread Aaron Ballman via cfe-commits
On Mon, Mar 2, 2020 at 11:42 AM Richard Smith - zygoloid via Phabricator wrote: > > rsmith added a comment. > > I'm also pretty concerned about using comments to drive warning behavior. We > discussed this when first adding our gallery fallthrough warning and its > suppression mechanism and

[clang-tools-extra] e7de00c - [clangd] Split locateSymbolAt into several component functions, to allow later reuse. NFC

2020-03-02 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-02T18:45:25+01:00 New Revision: e7de00cf974a4e30d4900518ae8473a117efbd6c URL: https://github.com/llvm/llvm-project/commit/e7de00cf974a4e30d4900518ae8473a117efbd6c DIFF: https://github.com/llvm/llvm-project/commit/e7de00cf974a4e30d4900518ae8473a117efbd6c.diff

[clang] 91cdbd5 - clang: Switch C compilations to C17 by default.

2020-03-02 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2020-03-02T09:39:26-08:00 New Revision: 91cdbd521a38495c66e30636943563ca70d3c022 URL: https://github.com/llvm/llvm-project/commit/91cdbd521a38495c66e30636943563ca70d3c022 DIFF:

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV); hliao wrote: > This check should be removed completely instead it should be revised for

[PATCH] D75423: [OpenCL] Mark pointers to constant address space as invariant

2020-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D75423#1901254 , @rjmccall wrote: > In D75423#1901206 , @hliao wrote: > > > invariant checking already takes account of loading from constant address > > space or memory

[PATCH] D75057: Syndicate, test and fix base64 implementation

2020-03-02 Thread Mitch Phillips via Phabricator via cfe-commits
hctim added a comment. Looks like this change broke the UBSan build bots: FAIL: LLVM-Unit :: Support/./SupportTests/Base64Test.Base64 (3484 of 36324) TEST 'LLVM-Unit :: Support/./SupportTests/Base64Test.Base64' FAILED Note: Google Test filter =

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, rovka, SjoerdMeijer, rsandifo-arm. Herald added subscribers: psnobl, rkruppe, mgrang, kristof.beyls, tschuett, mgorny. Herald added a reviewer: rengolin. Herald added a project: clang. sdesmalen added a parent revision: D75298:

[PATCH] D75383: clang: Switch C compilations to C17 by default.

2020-03-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D75383#1899211 , @rsmith wrote: > Looks good. Please consider updating the Clang 10 release notes to indicate > that we intend to change the default in Clang 11. https://reviews.llvm.org/D75469 Repository: rG

[PATCH] D75469: Add C standard upgrade in clang-11 release note

2020-03-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. As per rsmith (https://reviews.llvm.org/D75383). Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75469 Files:

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added inline comments. Comment at: clang/include/clang/Basic/AArch64SVETypeFlags.h:1 +//===- SveEmitter.cpp - Generate arm_sve.h for use with clang -*- C++ -*-===// +// I just see that this comment will need

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 247675. hliao added a comment. Remove unncessary condition checking. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h

[PATCH] D75402: [HIP] Make sure, unused hip-pinned-shadow global var is kept within device code

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. the assertion in addUsedGlobal should not be removed. that will remove the guard for potential bugs Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1919 void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { LLVMUsed.emplace_back(GV);

[PATCH] D63279: [Analyzer] Unroll for-loops where the upper boundary is a variable with know value

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Herald added subscribers: martong, steakhal. In D63279#1630510 , @Szelethus wrote: > In D63279#1630491 , @NoQ wrote: > > > the only reason it's not enabled by default yet is because we

[PATCH] D75423: [OpenCL] Mark pointers to constant address space as invariant

2020-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D75423#1901206 , @hliao wrote: > invariant checking already takes account of loading from constant address > space or memory (AA::pointsToConstantMemory), that's almost equivalent to > adding invariant attributes. Why do we

[PATCH] D75423: [OpenCL] Mark pointers to constant address space as invariant

2020-03-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D75423#1901206 , @hliao wrote: > invariant checking already takes account of loading from constant address > space or memory (AA::pointsToConstantMemory), that's almost equivalent to > adding invariant attributes. Why do we

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-03-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4367 +This is useful for variables that are always written to before use where the +default zero initialization provided by the toolchain loader is expensive. + }]; How about: >

[PATCH] D75056: [Driver] Default to -fno-common for all targets

2020-03-02 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Thanks all for the reviews and help. I will fix these things and do a last rebase/check before committing this tomorrow. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75056/new/ https://reviews.llvm.org/D75056

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Re-use token type `TT_AttributeColon` for C# attribute target colons. Repository: rG LLVM Github Monorepo

[PATCH] D75423: [OpenCL] Mark pointers to constant address space as invariant

2020-03-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. invariant checking already takes account of loading from constant address space or memory (AA::pointsToConstantMemory), that's almost equivalent to adding invariant attributes. Why do we mark these constant loads with additional attributes? CHANGES SINCE LAST ACTION

[PATCH] D75298: [Clang][SVE] Parse builtin type string for scalable vectors

2020-03-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 247659. sdesmalen marked an inline comment as done. sdesmalen added a comment. - Added comment describing `q` for scalable vectors to Builtins.def - Use `getKnownMinSize()` for calculating `LargestVectorWidth` CHANGES SINCE LAST ACTION

[PATCH] D75298: [Clang][SVE] Parse builtin type string for scalable vectors

2020-03-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D75298#1898770 , @efriedma wrote: > Can we avoid a gigantic, expensive to parse arm_sve.h somehow? Given that > the compiler has to know the signatures for all these buitins anyway, can we > just make including arm_sve.h

[PATCH] D73852: [clang] detect switch fallthrough marked by a comment (PR43465)

2020-03-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I'm also pretty concerned about using comments to drive warning behavior. We discussed this when first adding our gallery fallthrough warning and its suppression mechanism and made an explicit decision that we did not want comments to affect our behaviour. I don't think

[PATCH] D75056: [Driver] Default to -fno-common for all targets

2020-03-02 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added a comment. Looks good modulo minor comments. Comment at: clang/test/CodeGen/microsoft-no-common-align.c:1 // RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -o - %s | FileCheck %s typedef float TooLargeAlignment

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-03-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Is it sure that the signedness in the ranges is handled correctly? The EOF is a negative value but the `RangeInt` is unsigned type. The `tryExpandAsInteger` returns `int` too that is put into an unsigned `RangeInt` later. Probably it is better to use `APSInt` for the

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D75429#1901120 , @njames93 wrote: > In D75429#1901073 , @kadircet wrote: > > > In D75429#1901018 , @njames93 > > wrote: > > > > > - Fixed clang

[PATCH] D75461: Ignore macro expansions when scanning for fallthrough comments

2020-03-02 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added a reviewer: tstellar. Herald added a project: clang. Herald added a subscriber: cfe-commits. When scanning for fallthrough comments, it's not useful to go to the definition of a macro. We instead only want to search at the expanded source code

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-03-02 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield marked 2 inline comments as done. JonChesterfield added a comment. Fixed the spelling/formatting, added more tests. The C++ case would be improved by warning on `int x __attribute__((loader_uninitialised)) = 0` as there are two initializers. The semantics for C are not what I

[PATCH] D74910: [OpenCL] Remove spurious atomic_fetch_min/max builtins

2020-03-02 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8a37b9e61798: [OpenCL] Remove spurious atomic_fetch_min/max builtins (authored by svenvh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74910/new/

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-03-02 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 247652. JonChesterfield marked 2 inline comments as done. JonChesterfield added a comment. - Address review comments, more test coverage Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74361/new/

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75429#1901073 , @kadircet wrote: > In D75429#1901018 , @njames93 wrote: > > > - Fixed clang tidy warning, wont fix format as it's contradicting with the > > style of the rest of the

[PATCH] D75460: [clangd] Fix isInsideMainFile to be aware of preamble.

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75460 Files:

[clang] 8a37b9e - [OpenCL] Remove spurious atomic_fetch_min/max builtins

2020-03-02 Thread Sven van Haastregt via cfe-commits
Author: Sven van Haastregt Date: 2020-03-02T15:56:48Z New Revision: 8a37b9e61798ad6bb0e268d989c2f8b00a216414 URL: https://github.com/llvm/llvm-project/commit/8a37b9e61798ad6bb0e268d989c2f8b00a216414 DIFF: https://github.com/llvm/llvm-project/commit/8a37b9e61798ad6bb0e268d989c2f8b00a216414.diff

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9c4afce7024a: [clang-format] Rename CSharpNullConditionalSq and add missing test (authored by Jonathan Coe jb...@google.com). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 marked an inline comment as done. njames93 added a comment. I suppose the only other way would be having another virtual function like inside the helper classes virtual bool additionalLanguageConstraints(const LangOptions& LangOpts) const { return true; } bool

[clang] 9c4afce - [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Jonathan Coe via cfe-commits
Author: Jonathan Coe Date: 2020-03-02T15:46:33Z New Revision: 9c4afce7024aa1fe4efe2631240d1d766b4ea257 URL: https://github.com/llvm/llvm-project/commit/9c4afce7024aa1fe4efe2631240d1d766b4ea257 DIFF: https://github.com/llvm/llvm-project/commit/9c4afce7024aa1fe4efe2631240d1d766b4ea257.diff LOG:

[PATCH] D75056: [Driver] Default to -fno-common for all targets

2020-03-02 Thread Tom Stellard via Phabricator via cfe-commits
tstellar accepted this revision. tstellar added a comment. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75056/new/ https://reviews.llvm.org/D75056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75332: [clang-tidy] Add module for llvm-libc and restrict-system-libc-header-check.

2020-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/llvmlibc/RestrictSystemLibcHeadersCheck.cpp:40 +SrcMgr::CharacteristicKind FileType) { + if (SrcMgr::isSystem(FileType)) { +if (!SM.isInMainFile(HashLoc)) { njames93 wrote: >

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. > I think my preference is to go with isLanguageVersionSupported() and not use > base classes. +1, I can see this working, but the introduction of new concepts does not seem like it pulls its weight given the tiny amount of boilerplate that they eliminate.

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:232 +} +CharSourceRange DelRange = CharSourceRange::getTokenRange( +AttrTokens->front().location(), AttrTokens->back().location()); let's use

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D75429#1901018 , @njames93 wrote: > - Fixed clang tidy warning, wont fix format as it's contradicting with the > style of the rest of the function I believe the formatting linter messages results from the fact that you are

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75456/new/ https://reviews.llvm.org/D75456 ___ cfe-commits mailing list

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247643. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75456/new/ https://reviews.llvm.org/D75456 Files: clang/lib/Format/FormatToken.h clang/lib/Format/FormatTokenLexer.cpp clang/lib/Format/TokenAnnotator.cpp

[PATCH] D75441: [clang-tidy] Add helper base check classes that only run on specific language versions

2020-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:210 + using ClangTidyCheck::ClangTidyCheck; + bool isLanguageVersionSupported(const LangOptions ) const final { +return LangOpts.C99; The `final` means that one

[PATCH] D72041: [clangd] Handle go-to-definition in macro invocations where the target appears in the expansion multiple times

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:287 if (SM.getFileID(ArgStart) == SelFile) { - SourceLocation ArgEnd = SM.getTopMacroCallerLoc(Batch.back().location()); - return testTokenRange(SM.getFileOffset(ArgStart), -

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:50-68 +struct StreamErrorState { + // The error state of an opened stream. + // EofError: EOF condition (feof returns true) + //

[PATCH] D75444: [ARM,MVE] Add the `vsbciq` intrinsics.

2020-03-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 247641. simon_tatham added a comment. clang-formatted the code added to the C test source. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75444/new/ https://reviews.llvm.org/D75444 Files:

[PATCH] D75445: [ARM,MVE] Add the `vshlcq` intrinsics.

2020-03-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 247642. simon_tatham added a comment. clang-formatted the new C test file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75445/new/ https://reviews.llvm.org/D75445 Files:

Re: [clang] 83f4372 - [CodeGen] fix clang test that runs the optimizer pipeline; NFC

2020-03-02 Thread Sanjay Patel via cfe-commits
https://reviews.llvm.org/rG8cdcbcaa02e7 https://reviews.llvm.org/rG1e308452bf68 On Thu, Feb 27, 2020 at 6:29 PM Eric Christopher wrote: > Sure. That sounds great. Thanks! > > On Wed, Feb 26, 2020 at 10:45 AM Sanjay Patel > wrote: > >> To be clear - the test is checking IR instructions, but

[PATCH] D75414: [clangd] Resolve driver symlinks, and look up unknown relative drivers in PATH.

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: jyknight. sammccall added a comment. Per @jyknight on discord: we `-no-canonical-prefixes` disables this behavior in clang. Maybe we should scan for that and not resolve if it's present... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247640. njames93 added a comment. - Fixed clang tidy warning, wont fix format as it's contradicting with the style of the rest of the function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Rename CSharpNullConditionalSq to CSharpNullConditionalLSquare. Add test for spaces inside [] with C# Null conditionals.

[PATCH] D75365: [AST Matchers] Fix bug in 'optionally' matcher wherein all previous bindings are cleared when all inner matchers fail.

2020-03-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. > I think the difference is in whether you continue with the submatchers after > a success. Allof does while anyof does not. Oh, the short-circuiting makes a difference! I see. +1 to making it non-variadic then. Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] dc8680e - [CodeGenPGO] Fix shadow variable warning. NFC.

2020-03-02 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2020-03-02T15:06:34Z New Revision: dc8680eceb7c992cf1d02f47ad963dca2e287eaf URL: https://github.com/llvm/llvm-project/commit/dc8680eceb7c992cf1d02f47ad963dca2e287eaf DIFF: https://github.com/llvm/llvm-project/commit/dc8680eceb7c992cf1d02f47ad963dca2e287eaf.diff

[clang] 736385c - EHScopeStack::Cleanup has virtual functions so the destructor should be too.

2020-03-02 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2020-03-02T15:06:34Z New Revision: 736385c0b49d42f398ffa1458883f0d182178ef4 URL: https://github.com/llvm/llvm-project/commit/736385c0b49d42f398ffa1458883f0d182178ef4 DIFF: https://github.com/llvm/llvm-project/commit/736385c0b49d42f398ffa1458883f0d182178ef4.diff

[PATCH] D72041: [clangd] Handle go-to-definition in macro invocations where the target appears in the expansion multiple times

2020-03-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/Selection.cpp:287 if (SM.getFileID(ArgStart) == SelFile) { - SourceLocation ArgEnd = SM.getTopMacroCallerLoc(Batch.back().location()); - return

[PATCH] D75455: [clang-format] Allow nested [] in C# attributes

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Keep track of unpaired [] when identifying C# attribute lines Repository: rG LLVM Github Monorepo

[PATCH] D75350: [OpenMP] Allow const parameters in declare simd linear clause

2020-03-02 Thread Graham Hunter via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGad497658d25a: [OpenMP] Allow const parameters in declare simd linear clause (authored by huntergr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75350/new/

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-03-02 Thread Momchil Velikov via Phabricator via cfe-commits
chill added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp:200 +if (!F.hasFnAttribute("branch-target-enforcement")) + return false; +Attribute A = F.getFnAttribute("branch-target-enforcement"); chill wrote: >

[PATCH] D74131: [analyzer][taint] Add isTainted debug expression inspection check

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. LGTM, thanks! Feel free to commit as you're ready. Comment at: clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:97 .Case("clang_analyzer_express",

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-03-02 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. That said, my comments are not of the "over my dead body" kind ;) Comment at: clang/lib/CodeGen/CGCall.cpp:1828 + if (CodeGenOpts.BranchTargetEnforcement) { +FuncAttrs.addAttribute("branch-target-enforcement", "true"); + } I would

[PATCH] D75356: [Analyzer][StreamChecker] Introduction of stream error state handling.

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:50-68 +struct StreamErrorState { + // The error state of an opened stream. + // EofError: EOF condition (feof returns true) + // OtherError: other (non-EOF) error (ferror returns

[clang] ad49765 - [OpenMP] Allow const parameters in declare simd linear clause

2020-03-02 Thread Graham Hunter via cfe-commits
Author: Graham Hunter Date: 2020-03-02T14:54:14Z New Revision: ad497658d25a3616e4c57cf7d12e3497a1c66f35 URL: https://github.com/llvm/llvm-project/commit/ad497658d25a3616e4c57cf7d12e3497a1c66f35 DIFF: https://github.com/llvm/llvm-project/commit/ad497658d25a3616e4c57cf7d12e3497a1c66f35.diff

[PATCH] D75453: [Driver][ARM] fix undefined behaviour when checking architecture version

2020-03-02 Thread Jan Ole Hüser via Phabricator via cfe-commits
j0le created this revision. j0le added a reviewer: compnerd. j0le added a project: clang. Herald added a subscriber: kristof.beyls. Hello everyone, this is my first patch to/for clang. I hope, I did everything right. If not, please tell me. I found this bug: If you execute the following

[clang] 1e30845 - [CodeGen] avoid running the entire optimizer pipeline in clang test file; NFC

2020-03-02 Thread Sanjay Patel via cfe-commits
Author: Sanjay Patel Date: 2020-03-02T09:47:32-05:00 New Revision: 1e308452bf68b9576a76004de28307f0318ef9eb URL: https://github.com/llvm/llvm-project/commit/1e308452bf68b9576a76004de28307f0318ef9eb DIFF: https://github.com/llvm/llvm-project/commit/1e308452bf68b9576a76004de28307f0318ef9eb.diff

[PATCH] D75368: [clang-format] Handle NullCoalescing and NullConditional operators in C#

2020-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Sorry, did the last round of comments not make sense? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75368/new/ https://reviews.llvm.org/D75368 ___ cfe-commits mailing list

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. The high level idea and the implementation of the checker seems great. In general, things that you want to address in later patches should be stated in the code with a `TODO`. I wrote a couple nits that I don't want to delete, but maybe it'd be better to address them

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4365 +The ``loader_uninitialized`` attribute can be placed on global variables to +indicate that the variable does not need to be zero

[PATCH] D75350: [OpenMP] Allow const parameters in declare simd linear clause

2020-03-02 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli accepted this revision. fpetrogalli added a comment. LGTM, thank you @huntergr ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75350/new/ https://reviews.llvm.org/D75350 ___ cfe-commits

[PATCH] D75439: [clangd] No need to query ctor refs in cross-file rename.

2020-03-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9ad109922450: [clangd] No need to query ctor refs in cross-file rename. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75439/new/

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247621. njames93 marked 3 inline comments as done. njames93 added a comment. - added virtual virtual Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files:

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 247620. njames93 added a comment. - Macro handling more in line with rest of clangd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75429/new/ https://reviews.llvm.org/D75429 Files:

[PATCH] D74973: [analyzer] StdLibraryFunctionsChecker refactor w/ inheritance

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I have some high level questions, you have spent far more time with this code and I'm happy to be proven wrong! :) In D74973#1889188 , @martong wrote: > > Is really more kind of constraint needed than range constraint? > >

[clang-tools-extra] 9ad1099 - [clangd] No need to query ctor refs in cross-file rename.

2020-03-02 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-03-02T15:21:32+01:00 New Revision: 9ad109922450ce3519a5431c72cdc9d4c20a18bf URL: https://github.com/llvm/llvm-project/commit/9ad109922450ce3519a5431c72cdc9d4c20a18bf DIFF: https://github.com/llvm/llvm-project/commit/9ad109922450ce3519a5431c72cdc9d4c20a18bf.diff

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2020-03-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:355 + template + void checkRealloc(CheckerContext , const CallExpr *CE, +ProgramStateRef State) const; The `CHECK_FN` could be used even here?

[PATCH] D75368: [clang-format] Handle NullCoalescing and NullConditional operators in C#

2020-03-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc3af063c2bbf: [clang-format] Handle NullCoalescing and NullConditional operators in C# (authored by Jonathan Coe jb...@google.com). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-03-02 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield updated this revision to Diff 247617. JonChesterfield added a comment. - Rename attribute, propose some documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74361/new/ https://reviews.llvm.org/D74361 Files:

[PATCH] D71110: [clangd] A tool to evaluate cross-file rename.

2020-03-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 247615. hokein added a comment. rebase to master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71110/new/ https://reviews.llvm.org/D71110 Files: clang-tools-extra/clangd/CMakeLists.txt

[PATCH] D75350: [OpenMP] Allow const parameters in declare simd linear clause

2020-03-02 Thread Graham Hunter via Phabricator via cfe-commits
huntergr updated this revision to Diff 247614. huntergr added a comment. - Removed the ) my editor helpfully added to the CHECK line - Added a test to declare_simd_aarch64.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75350/new/

[PATCH] D75445: [ARM,MVE] Add the `vshlcq` intrinsics.

2020-03-02 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. FYI: I have raised https://github.com/google/llvm-premerge-checks/issues/141 (the premerge check machinery failed to apply the patch, but this is not reflected in the build status). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75447: [clangd] Make use of token buffers in semantic highlighting

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:134 public: - HighlightingsBuilder(const SourceManager , - const LangOptions ) - : SourceMgr(SourceMgr), LangOpts(LangOpts) {} +

[clang] 8cdcbca - [CodeGen] avoid running the entire optimizer pipeline in clang test file; NFC

2020-03-02 Thread Sanjay Patel via cfe-commits
Author: Sanjay Patel Date: 2020-03-02T09:12:53-05:00 New Revision: 8cdcbcaa02e7055a6745f2c1bde003c47c91f79e URL: https://github.com/llvm/llvm-project/commit/8cdcbcaa02e7055a6745f2c1bde003c47c91f79e DIFF: https://github.com/llvm/llvm-project/commit/8cdcbcaa02e7055a6745f2c1bde003c47c91f79e.diff

[clang] c3af063 - [clang-format] Handle NullCoalescing and NullConditional operators in C#

2020-03-02 Thread Jonathan Coe via cfe-commits
Author: Jonathan Coe Date: 2020-03-02T13:55:54Z New Revision: c3af063c2bbfe5408d565ee4350c36fc1d0b2758 URL: https://github.com/llvm/llvm-project/commit/c3af063c2bbfe5408d565ee4350c36fc1d0b2758 DIFF: https://github.com/llvm/llvm-project/commit/c3af063c2bbfe5408d565ee4350c36fc1d0b2758.diff LOG:

[PATCH] D75365: [AST Matchers] Fix bug in 'optionally' matcher wherein all previous bindings are cleared when all inner matchers fail.

2020-03-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D75365#1900784 , @gribozavr2 wrote: > +1 to this fix. > > However, regarding `allOf` vs. `anyOf` semantics, since `optionally` always > succeeds, is there a difference between the two semantics? > > It seems to me that there

[PATCH] D75271: [analyzer][NFC] Change LangOptions to CheckerManager in the shouldRegister* functions.

2020-03-02 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware accepted this revision. baloghadamsoftware added a comment. I think this is straightforward after D75360 . This was my original attempt as well, but without D75360 it did not work. This solves the problem of

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-03-02 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. The above patch composes sensibly with openmp, e.g. #include #pragma omp declare target int data __attribute__((no_zero_initializer)); #pragma omp allocate(data) allocator(omp_pteam_mem_alloc) #pragma omp end declare target @data = hidden

[PATCH] D75429: [clangd] DefineOutline won't copy virtual specifiers on methods

2020-03-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp:244 +bool Any = false; +// Clang allows duplicating virtual specifiers so check for multiple +// occurances. njames93 wrote: > kadircet wrote: > >

<    1   2   3   >