[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: clang/include/c

[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: clang/include/clang/Basic/arm_m

[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] 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 clang/unittests/Format/FormatTestCS

[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 &LangOpts) const final { +return LangOpts.C99; The `final` means t

[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 cfe

[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] 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 `s

[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 https://lists.llvm.org/cgi-bin

[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. Reposit

[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] 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 ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[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 isLanguageVersionS

[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] 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-tools-extra/cla

[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 fu

[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/ https://

[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/ https://

[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 ho

[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 locatio

[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] 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 r

[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 __attrib

[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] 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 se

[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 https://reviews.ll

[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 h

[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 https://reviews.

[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] 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: > T

[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 m

[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 mar

[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 for

[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] 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 clang/lib/

[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 u

[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 LLVM

[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] 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: clang/docs/Relea

[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 = Bas

[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 (AA::pointsToCons

[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

[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: https://github.com/llvm/llvm-project/commit/91cdbd521a38495c66e30636943563ca70d3c022.di

[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 LO

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 made

[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 complet

[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 reg

[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 sho

[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] 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 alrea

[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/ https:

[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/ https:/

[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] 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 specified

[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] 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 clang/include/c

[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] 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 glo

[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] D72874: [clangd] Add a textual fallback for go-to-definition

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:313 SourceLocation getBeginningOfIdentifier(const Position &Pos, const SourceManager &SM, sammccall wrote: > sammccall wrote: > > @kad

[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 a comment. In D75402#1901370 , @hsmhsm wrote: > In D75402#1901361 , @hliao wrote: > > > BTW, why that variable cannot have an initializer? Suppose that initializer > > is a trivial one, initializing to

[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#1901362 , @rjmccall wrote: > Okay, then I have no problem taking a patch for this into IRGen. But I think > it should be fine to do this by adding the invariant-load metadata when > loading from an l-value instead of in

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

2020-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:313 SourceLocation getBeginningOfIdentifier(const Position &Pos, const SourceManager &SM, sammccall wrote: > @kadircet is working on g

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

2020-03-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 247682. nickdesaulniers added a comment. - s/following/next/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75469/new/ https://reviews.llvm.org/D75469 Files: clang/docs/ReleaseNotes.rst Index: clang

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

2020-03-02 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. pushed: https://github.com/llvm/llvm-project/commit/001c8aac80e3924c33a4cc644cca58401c72fe6b Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75469/new/ https://reviews.llvm.org/D75469 _

[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 t

[PATCH] D31343: Add an attribute plugin example

2020-03-02 Thread John Brawn via Phabricator via cfe-commits
john.brawn marked 2 inline comments as done. john.brawn added inline comments. Comment at: clang/examples/Attribute/Attribute.cpp:35 +Spellings.push_back({ParsedAttr::AS_GNU, "example"}); +Spellings.push_back({ParsedAttr::AS_CXX11, "::example"}); +Spellings.push_back(

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

2020-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7436 + case ParsedAttr::AT_LoaderUninitialized: +handleLoaderUninitializedAttr(S, D, AL); +break; rjmccall wrote: > JonChesterfield wrote: > > aaron.ballman wrote: > > > If

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D73720#1874014 , @baloghadamsoftware wrote: > In case of multiple container-related bugs only mark the container > interesting on the correct bug path. Also a typo fixed. ~~Uh-oh, I'm not sure why this would ever be an iss

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

2020-03-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 247688. yaxunl marked 2 inline comments as done. yaxunl added a comment. revised by John's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75423/new/ https://reviews.llvm.org/D75423 Files: clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGe

[PATCH] D74541: [Analyzer] Use note tags to track iterator increments and decrements

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. See my related comment here: D73720#1901453 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74541/new/ https://reviews.llvm.org/D74541 ___ cfe-commits mailing list cfe-com

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-03-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. Apologies -- I'd definitely prefer to address the debug related changes in a separate pack, similarly to D74541 . CHANGES SINCE LAST ACTION

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

2020-03-02 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: llvm/include/llvm/ADT/FloatingPointMode.h:48 - DenormalMode() = default; - DenormalMode(DenormalModeKind Out, DenormalModeKind In) : + constexpr DenormalMode() = default; + constexpr DenormalMode(DenormalModeKind Out, DenormalModeKi

[clang] c112e94 - [OPENMP50]Add basic support for depobj construct.

2020-03-02 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-03-02T13:10:32-05:00 New Revision: c112e941a0c5d3b3423272c3f0024cdf6b50e44e URL: https://github.com/llvm/llvm-project/commit/c112e941a0c5d3b3423272c3f0024cdf6b50e44e DIFF: https://github.com/llvm/llvm-project/commit/c112e941a0c5d3b3423272c3f0024cdf6b50e44e.diff

[clang] e392dcd - [Sema] Look through OpaqueValueExpr when checking implicit conversions

2020-03-02 Thread Erik Pilkington via cfe-commits
Author: Erik Pilkington Date: 2020-03-02T11:24:36-08:00 New Revision: e392dcd5708b3bb188ff4043b09ae151472a7632 URL: https://github.com/llvm/llvm-project/commit/e392dcd5708b3bb188ff4043b09ae151472a7632 DIFF: https://github.com/llvm/llvm-project/commit/e392dcd5708b3bb188ff4043b09ae151472a7632.dif

[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 updated this revision to Diff 247689. hsmhsm added a comment. Take care review comments by hliao. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75402/new/ https://reviews.llvm.org/D75402 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/

[PATCH] D75473: [clang-format] parse C# object initialisers

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. Treat C# object initializers as braced lists. Allow lambdas inside C# braced lists. Repository: rG LLVM Github Monorepo h

[PATCH] D75194: [clang-format] Do not merge very long C# automatic properties

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. I will try to handle this in unwrapped line parser. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75194/new/ https://reviews.llvm.org/D75194 _

[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#1901407 , @yaxunl wrote: > In D75423#1901362 , @rjmccall wrote: > > > Okay, then I have no problem taking a patch for this into IRGen. But I > > think it should be fine to do th

[PATCH] D75474: [clangd] Get rid of getTokenRange helper

2020-03-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov, mgorny. Herald added a project: clang. kadircet added a parent revision: D75447: [clangd] Make use of token buffers in semantic highli

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

2020-03-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/test/CodeGenCXX/attr-loader-uninitialized.cpp:23 +// CHECK: @nominally_value_init = global i32 undef +int nominally_value_init [[clang::loader_uninitialized]] = 4; + This test case is identical to line 36 of

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-03-02 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/test/CodeGenCXX/lto-visibility-inference.cpp:73 c1->f(); - // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C2" + // ITANIUM: type.test{{.*}}!"_ZTS2C2" // MS: type.test{{.*}}!"?AUC2@@" tejohnson wrote: > evgeny777 wrote:

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

2020-03-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 247695. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75447/new/ https://reviews.llvm.org/D75447 Files: clang-tools-ex

[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 247696. JonChesterfield marked 2 inline comments as done. JonChesterfield added a comment. - Reject initialisers, update doc to recommended string Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74361/new/

[PATCH] D75387: [Sema] Look through OpaqueValueExpr when checking implicit conversions

2020-03-02 Thread Erik Pilkington via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe392dcd5708b: [Sema] Look through OpaqueValueExpr when checking implicit conversions (authored by erik.pilkington). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 6377676 - Add default paths to support musl target

2020-03-02 Thread Sid Manning via cfe-commits
Author: Sid Manning Date: 2020-03-02T13:39:42-06:00 New Revision: 637767665141ae48c7a0558903bb29e03bf5ad6f URL: https://github.com/llvm/llvm-project/commit/637767665141ae48c7a0558903bb29e03bf5ad6f DIFF: https://github.com/llvm/llvm-project/commit/637767665141ae48c7a0558903bb29e03bf5ad6f.diff L

[PATCH] D75139: [hexagon] Pickup the default crt and libs when the musl target is selected

2020-03-02 Thread Sid Manning via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG637767665141: Add default paths to support musl target (authored by sidneym). Changed prior to commit: https://reviews.llvm.org/D75139?vs=247251&id=247701#toc Repository: rG LLVM Github Monorepo CHA

[clang] 375437a - [OPENMP50]Support 'destroy' clause on 'depobj' directives.

2020-03-02 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-03-02T14:40:53-05:00 New Revision: 375437ab92a879629cd6abef057428f3572514c2 URL: https://github.com/llvm/llvm-project/commit/375437ab92a879629cd6abef057428f3572514c2 DIFF: https://github.com/llvm/llvm-project/commit/375437ab92a879629cd6abef057428f3572514c2.diff

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

2020-03-02 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield marked 4 inline comments as done. JonChesterfield 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 loa

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

2020-03-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > The main reason we couldn't remove the header file is because of the > short-forms/overloaded intrinsics How are you planning to handle them with your current approach? Anyway, that isn't really relevant to the question of why we need to `#define svld1_u8(...) __bui

[clang] 0858eeb - Revert "Add default paths to support musl target"

2020-03-02 Thread Sid Manning via cfe-commits
Author: Sid Manning Date: 2020-03-02T14:09:52-06:00 New Revision: 0858eebd2a48b931f2ef1dfa23042980bd6a773d URL: https://github.com/llvm/llvm-project/commit/0858eebd2a48b931f2ef1dfa23042980bd6a773d DIFF: https://github.com/llvm/llvm-project/commit/0858eebd2a48b931f2ef1dfa23042980bd6a773d.diff L

[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/test/CodeGenCXX/attr-loader-uninitialized.cpp:23 +// CHECK: @nominally_value_init = global i32 undef +int nominally_value_init [[clang::loader_uninitialized]] = 4; + JonChesterfield wrote: > Quuxplusone wrote: >

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

2020-03-02 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks for all the comments Sam! I'll have a detailed look tomorrow, but I wanted to follow up on this: In D72874#1901383 , @sammccall wrote: > I think having this trigger where the identifier is an actual token in the > program

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

2020-03-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/test/CodeGenCXX/attr-loader-uninitialized.cpp:23 +// CHECK: @nominally_value_init = global i32 undef +int nominally_value_init [[clang::loader_uninitialized]] = 4; + rjmccall wrote: > JonChesterfield wrote: >

[clang] 7e77cf4 - [Clang] Fix Hurd toolchain test on a two-stage build with ThinLTO

2020-03-02 Thread Alexandre Ganea via cfe-commits
Author: Alexandre Ganea Date: 2020-03-02T15:42:33-05:00 New Revision: 7e77cf473ac9d8f8b65db017d660892f1c8f4b75 URL: https://github.com/llvm/llvm-project/commit/7e77cf473ac9d8f8b65db017d660892f1c8f4b75 DIFF: https://github.com/llvm/llvm-project/commit/7e77cf473ac9d8f8b65db017d660892f1c8f4b75.dif

[PATCH] D75139: [hexagon] Pickup the default crt and libs when the musl target is selected

2020-03-02 Thread Sid Manning via Phabricator via cfe-commits
sidneym updated this revision to Diff 247711. sidneym added a comment. Update testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75139/new/ https://reviews.llvm.org/D75139 Files: clang/lib/Driver/ToolChains/Hexagon.cpp clang/test/Driver/h

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

2020-03-02 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/SemanticHighlighting.cpp:162 +[&](const syntax::Token &Tok) { return Tok.location() < Loc; }); +assert(Tok); +

[PATCH] D75373: [Clang] Fix Hurd toolchain class hierarchy

2020-03-02 Thread Alexandre Ganea via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7e77cf473ac9: [Clang] Fix Hurd toolchain test on a two-stage build with ThinLTO (authored by aganea). Changed prior to commit: https://reviews.llvm.org/D75373?vs=247542&id=247715#toc Repository: rG L

[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 inline comments. Comment at: clang/test/CodeGenCXX/attr-loader-uninitialized.cpp:23 +// CHECK: @nominally_value_init = global i32 undef +int nominally_value_init [[clang::loader_uninitialized]] = 4; + --

<    1   2   3   >