[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 222360. hokein marked 3 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67907/new/ https://reviews.llvm.org/D67907 Files: clang-tools-ex

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/HeaderSourceSwitch.cpp:113 + auto Best = Candidates.begin(); + for (auto It = Candidates.begin(); It != Candidates.end(); ++It) { +if (It->second > Best->second) kadircet wrote: > nit: `for(

[PATCH] D68199: [analyzer] DynamicTypeInfo: Simplify the API

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Charusso retitled this revision from "[analyzer] DynamicTypeInfo

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/DynamicType.cpp:44 + +bool isDerivedFrom(QualType X, QualType Y) { + const CXXRecordDecl *XRD = X->getPointeeCXXRecordDecl(); Szelethus wrote: > Hmm, I think this function answers the ques

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 222370. Charusso marked 2 inline comments as done. Charusso added a comment. - When we have no information whether the cast succeeds or not we assume both. - `CastVisitor` is the new facility which decides whether the assumptions are appropriate. - The math

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 222372. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68141/new/ https://reviews.llvm.org/D68141 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGC

r373193 - [lldb][clang][modern-type-lookup] Use ASTImporterSharedState in ExternalASTMerger

2019-09-30 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Mon Sep 30 01:52:16 2019 New Revision: 373193 URL: http://llvm.org/viewvc/llvm-project?rev=373193&view=rev Log: [lldb][clang][modern-type-lookup] Use ASTImporterSharedState in ExternalASTMerger Summary: The ExternalASTMerger should use the ASTImporterSharedState. This all

[PATCH] D68142: [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 222380. gchatelet marked an inline comment as done. gchatelet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68142/new/ https://reviews.llvm.org/D68142 Files: clang/lib/C

r373195 - [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via cfe-commits
Author: gchatelet Date: Mon Sep 30 02:37:05 2019 New Revision: 373195 URL: http://llvm.org/viewvc/llvm-project?rev=373195&view=rev Log: [Alignment][NFC] Remove LoadInst::setAlignment(unsigned) Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context:

[PATCH] D68142: [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373195: [Alignment][NFC] Remove LoadInst::setAlignment(unsigned) (authored by gchatelet, committed by ). Changed prior to commit: https://reviews.llvm.org/D68142?vs=222380&id=222381#toc Repository: r

[clang-tools-extra] r373197 - [clangd] Implement a smart version of HeaderSource switch.

2019-09-30 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Sep 30 03:48:02 2019 New Revision: 373197 URL: http://llvm.org/viewvc/llvm-project?rev=373197&view=rev Log: [clangd] Implement a smart version of HeaderSource switch. Summary: This patch implements another version header-source switch by incorporating the AST and index, i

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373197: [clangd] Implement a smart version of HeaderSource switch. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D68142: [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. This patch broke polly, I'm working on a fix. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68142/new/ https://reviews.llvm.org/D68142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:90-106 + FnCheck identifyCall(const CallEvent &Call, CheckerContext &C, + const CallExpr *CE) const; + + void evalFop

r373198 - DeclCXX/ExprCXX - silence static analyzer getAs<> null dereference warnings. NFCI.

2019-09-30 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Mon Sep 30 04:04:12 2019 New Revision: 373198 URL: http://llvm.org/viewvc/llvm-project?rev=373198&view=rev Log: DeclCXX/ExprCXX - silence static analyzer getAs<> null dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but in these

[PATCH] D68142: [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. In D68142#1687693 , @gchatelet wrote: > This patch broke polly, I'm working on a fix. https://reviews.llvm.org/rL373199 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68142/new/ https://reviews.

Re: [PATCH] D55802: Change CGObjC to use objc intrinsics instead of runtime methods

2019-09-30 Thread David Chisnall via cfe-commits
Hi, Yes, I believe it does still reproduce (at least, with the most recent build that I tried). We worked around the clang bug to make the test pass: https://github.com/gnustep/libobjc2/commit/eab35fce379eb6ab1423dbb6d7908cb782f13458#diff-7f1eea7fdb5c7c3bf21f08d1cfe98a19 Reintroducing the 's

[PATCH] D68137: [clangd] Handle template arguments in findExplicitReferences

2019-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:556 + // We re-define Traverse*, since there's no corresponding Visit*. + bool TraverseTemplateArgumentLoc(TemplateArgumentLoc A) { ... and we need it because, template templa

[PATCH] D67695: [clangd] Implement getBeginning for overloaded operators.

2019-09-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Mostly NITs, except the naming of the new `TokenKind` enum. I think it's better to pick something that's not clashing with `clang::tok::TokenKind`, even if the enum is in a different namespace. Comment at: clang-tools-extra/clangd/SourceCode.cpp:

[PATCH] D68211: [clangd] Use the index-based API to do the header-source switch.

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. If the file heuristic fails, we try to use the index&AST to do the header/source inference. Repository: rG LLVM Github

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 222400. gchatelet marked an inline comment as done. gchatelet added a comment. Herald added a reviewer: bollu. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68141/new/ https://reviews.llvm.

[PATCH] D68213: [LTO] Support for embedding bitcode section during LTO

2019-09-30 Thread Josef Eisl via Phabricator via cfe-commits
zapster updated this revision to Diff 222401. zapster added a comment. re-ran clang format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68213/new/ https://reviews.llvm.org/D68213 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/Frontend/x86-embed-bitcode.ll llvm/include/llvm/

[PATCH] D68213: [LTO] Support for embedding bitcode section during LTO

2019-09-30 Thread Josef Eisl via Phabricator via cfe-commits
zapster created this revision. zapster added reviewers: LLVM, clang, rsmith, pcc. Herald added subscribers: llvm-commits, cfe-commits, dang, dexonsmith, steven_wu, aheejin, hiraditya, inglorion, mehdi_amini. Herald added a reviewer: alexshap. Herald added projects: clang, LLVM. zapster updated thi

[PATCH] D68213: [LTO] Support for embedding bitcode section during LTO

2019-09-30 Thread Josef Eisl via Phabricator via cfe-commits
zapster marked 5 inline comments as done. zapster added a comment. Added inline remarks. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1547 } -static const char* getSectionNameForBitcode(const Triple &T) { moved to `llvm/lib/Bitcode/Writer/BitcodeWriter.cpp`

r373207 - [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via cfe-commits
Author: gchatelet Date: Mon Sep 30 06:34:44 2019 New Revision: 373207 URL: http://llvm.org/viewvc/llvm-project?rev=373207&view=rev Log: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned) Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context

[PATCH] D65543: [Windows] Autolink with basenames and add libdir to libpath

2019-09-30 Thread Russell Gallop via Phabricator via cfe-commits
russell.gallop added a comment. > The other thing worth checking is the clang PGO self-host on Windows. > This has the potential to break that, and the fix would be to add a linker > flag in LLVM's cmake. This does indeed break PGO self-host with lld-link (applied on top of r373200): <...>\b

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373207: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned) (authored by gchatelet, committed by ). Changed prior to commit: https://reviews.llvm.org/D68141?vs=222400&id=222409#toc Repository:

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/trunk/lib/Target/AArch64/AArch64StackTagging.cpp:65 -static constexpr unsigned kTagGranuleSize = 16; +static const Align kTagGranuleSize = Align(16); Can't the Align ctor be constexpr? Will this result in a

r373210 - [OPENMP] Fix comment, NFC.

2019-09-30 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Sep 30 07:05:26 2019 New Revision: 373210 URL: http://llvm.org/viewvc/llvm-project?rev=373210&view=rev Log: [OPENMP] Fix comment, NFC. Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp URL: http://llvm.org/viewvc/llvm-project/c

[PATCH] D67695: [clangd] Implement getBeginning for overloaded operators.

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 222423. hokein marked 8 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67695/new/ https://reviews.llvm.org/D67695 Files: clang-tools-extra/cla

[PATCH] D67695: [clangd] Implement getBeginning for overloaded operators.

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:242 + +enum TokenKind { Identifier, Operator, Whitespace, Other }; + ilya-biryukov wrote: > `TokenKind` has the same name as `tok::TokenKind`. Could we use a different > name here

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D67592#1686898 , @the_jk wrote: > I don't have commit access so I'd need someone to push this, thanks. I can commit for you today. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67592/new/ https://reviews.llvm.org/

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet marked an inline comment as done. gchatelet added inline comments. Comment at: llvm/trunk/lib/Target/AArch64/AArch64StackTagging.cpp:65 -static constexpr unsigned kTagGranuleSize = 16; +static const Align kTagGranuleSize = Align(16); arichardson wro

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-30 Thread Joel Klinghed via Phabricator via cfe-commits
the_jk added a comment. Great, thanks again. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67592/new/ https://reviews.llvm.org/D67592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D68024: [clangd] Implement GetEligiblePoints

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.h:270 + /// It will be “a::b” for both carrot locations. + std::string CurrentNamespace; + /// Offsets into the code marking eligible points to insert a function kadircet wrote: > ho

[PATCH] D68211: [clangd] Use the index-based API to do the header-source switch.

2019-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, mostly LG Comment at: clang-tools-extra/clangd/ClangdServer.cpp:453 +void ClangdServer::switchSourceHeader( +PathRef Path, Callback> CB) { + if (auto CorrespondingFile = could you add some comments explaining, why we first

r373213 - Correct function declarations; NFC.

2019-09-30 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Sep 30 07:43:52 2019 New Revision: 373213 URL: http://llvm.org/viewvc/llvm-project?rev=373213&view=rev Log: Correct function declarations; NFC. This header is included by C code so the functions need to have a prototype. Also, fix the function definitions so that t

[PATCH] D68211: [clangd] Use the index-based API to do the header-source switch.

2019-09-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 222432. hokein marked 4 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68211/new/ https://reviews.llvm.org/D68211 Files: clang-tools-extra/cla

[PATCH] D68024: [clangd] Implement GetEligiblePoints

2019-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 222434. kadircet marked 7 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68024/new/ https://reviews.llvm.org/D68024 Files: clang-tools-ex

[PATCH] D68024: [clangd] Implement GetEligiblePoints

2019-09-30 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.h:270 + /// It will be “a::b” for both carrot locations. + std::string CurrentNamespace; + /// Offsets into the code marking eligible points to insert a function ilya-biryukov wrot

[PATCH] D68211: [clangd] Use the index-based API to do the header-source switch.

2019-09-30 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. some nits, thanks! Comment at: clang-tools-extra/clangd/ClangdServer.cpp:456 + // 1) use the file-only heuristic, it requires some IO but it is much + //faster tha

r373217 - [Clang] Use -main-file-name for source filename if not set

2019-09-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Mon Sep 30 08:05:35 2019 New Revision: 373217 URL: http://llvm.org/viewvc/llvm-project?rev=373217&view=rev Log: [Clang] Use -main-file-name for source filename if not set -main-file-name is currently used to set the source name used in debug information. If the source fil

[PATCH] D68021: [IntrinsicEmitter] Add overloaded type VecOfBitcastsToInt for SVE intrinsics

2019-09-30 Thread Cullen Rhodes via Phabricator via cfe-commits
c-rhodes accepted this revision. c-rhodes added a comment. This revision is now accepted and ready to land. LGTM Looks like a pretty straightforward change. Might be worth waiting a day or so before committing incase anyone else has any comments. CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D68227: [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

2019-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, klimek, owenpan, ioeric. MyDeveloperDay added a project: clang-format. Herald added a project: clang. MyDeveloperDay edited the summary of this revision. This is a patch to fix PR43372 (https://bugs.llvm.org/show_bug.c

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-30 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373217: [Clang] Use -main-file-name for source filename if not set (authored by tejohnson, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D68023: [AArch64][SVE] Implement int_aarch64_sve_cnt intrinsic

2019-09-30 Thread Cullen Rhodes via Phabricator via cfe-commits
c-rhodes accepted this revision. c-rhodes added a comment. This revision is now accepted and ready to land. LGTM Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:100-104 + defm CLS_ZPmZ : sve_int_un_pred_arit_1< 0b000, "cls", null_frag>; + defm CLZ_ZPmZ : sve_in

[PATCH] D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions.

2019-09-30 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. In D68117#1686929 , @SouraVX wrote: > In D68117#1686235 , @aprantl wrote: > > > This needs a lot more test coverage: The frontend cases aren't all covered > > by frontend checks and neither

[PATCH] D68157: [X86][ABI] Keep empty class argument passing by value compatible with GCC.

2019-09-30 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68157/new/ https://reviews.llvm.org/D68157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D64799: [Sema] Emit diagnostics for uncorrected delayed typos at the end of TU

2019-09-30 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. Herald added a subscriber: usaxena95. In D64799#1651908 , @vsapsai wrote: > For the record, there was another change regarding the delayed typos in > `clang::Sema::~Sema()`: D62648 [Sema][Typo]

[PATCH] D67695: [clangd] Implement getBeginning for overloaded operators.

2019-09-30 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. Mostly LGTM Comment at: clang-tools-extra/clangd/SourceCode.cpp:258 + +TokenKind getTokenKind(SourceLocation Loc, const SourceManager &SM, +

[PATCH] D68193: In openFileForRead don't cache erroneous entries if the error relates to them being directories. Add tests.

2019-09-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:21-22 // Load the file and its content from the file system. ll

[PATCH] D67830: [AArch64][SVE] Implement punpk[hi|lo] intrinsics

2019-09-30 Thread Kerry McLaughlin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373232: [AArch64][SVE] Implement punpk[hi|lo] intrinsics (authored by kmclaughlin, committed by ). Changed prior to commit: https://reviews.llvm.org/D67830?vs=221010&id=222458#toc Repository: rL LLVM

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. This is failing on my mac like so: FAIL: Clang :: Frontend/stdin-input.c (1 of 1) TEST 'Clang :: Frontend/stdin-input.c' FAILED Script: -- : 'RUN: at line 1'; cat /Users/thakis/src/llvm-project/clang/test/Frontend/std

r373237 - Fix buildbot failure from r373217 (don't match metadata id exactly)

2019-09-30 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Mon Sep 30 10:26:48 2019 New Revision: 373237 URL: http://llvm.org/viewvc/llvm-project?rev=373237&view=rev Log: Fix buildbot failure from r373217 (don't match metadata id exactly) Fix this failure by ignoring the id of the metadata being checked: http://green.lab.llvm

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-30 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D67592#1688413 , @thakis wrote: > This is failing on my mac like so: This should be fixed by r373237. I didn't get any email with buildbot failures, but someone mailed one to me manually. Not sure why it only fails sometime

[PATCH] D65543: [Windows] Autolink with basenames and add libdir to libpath

2019-09-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Another option would be to let the behaviour be controlled by `/Brepro`, so that the default behaviour would be to embed the path, while `/Brepro` builds would only embed the basename. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Yup, test is happy now, thanks! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67592/new/ https://reviews.llvm.org/D67592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D66696: [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2019-09-30 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington accepted this revision. erik.pilkington added a comment. This revision is now accepted and ready to land. Okay, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66696/new/ https://reviews.llvm.org/D66696 ___ cfe-commits m

[PATCH] D14484: Formatting constructor initializer lists by putting them always on different lines

2019-09-30 Thread Pooya Daravi via Phabricator via cfe-commits
puya added a comment. For what it's worth the original post is also the style used at our company. I am hesitant to patch clang-format as I don't want to have to maintain it so I hope this is added. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14484/new/ https:

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/trunk/lib/Target/AArch64/AArch64StackTagging.cpp:65 -static constexpr unsigned kTagGranuleSize = 16; +static const Align kTagGranuleSize = Align(16); gchatelet wrote: > arichardson wrote: > > Can't the Align

[PATCH] D68114: Fix for expanding __pragmas in macro arguments

2019-09-30 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 222464. akhuang added a comment. comments/whitespace/test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68114/new/ https://reviews.llvm.org/D68114 Files: clang/lib/Lex/Pragma.cpp clang/test/Preprocessor/pr

r373243 - [OPENMP50]Do not emit warning for the function with the currently

2019-09-30 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Sep 30 11:24:35 2019 New Revision: 373243 URL: http://llvm.org/viewvc/llvm-project?rev=373243&view=rev Log: [OPENMP50]Do not emit warning for the function with the currently defined body. If the function is currently defined, we should not emit a warning that it might be

r373247 - Teach CallGraph to look into Generic Lambdas.

2019-09-30 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Sep 30 12:12:29 2019 New Revision: 373247 URL: http://llvm.org/viewvc/llvm-project?rev=373247&view=rev Log: Teach CallGraph to look into Generic Lambdas. CallGraph visited LambdaExpr by getting the Call Operator from CXXRecordDecl (LambdaExpr::getCallOperator calls CX

[PATCH] D68193: In openFileForRead don't cache erroneous entries if the error relates to them being directories. Add tests.

2019-09-30 Thread Kousik Kumar via Phabricator via cfe-commits
kousikk updated this revision to Diff 222474. kousikk added a comment. Avoid the extra stat() call Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68193/new/ https://reviews.llvm.org/D68193 Files: clang/include/clang/Tooling/DependencyScanning/Dep

[PATCH] D68193: In openFileForRead don't cache erroneous entries if the error relates to them being directories. Add tests.

2019-09-30 Thread Kousik Kumar via Phabricator via cfe-commits
kousikk marked 3 inline comments as done. kousikk added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:236-237 if (!CacheEntry.isValid()) { + llvm::vfs::FileSystem &FS = getUnderlyingFS(); + auto MaybeStatus = FS

[PATCH] D67919: [Diagnostics] Warn if enumeration type mismatch in conditional expression

2019-09-30 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 aside from a commenting request. Comment at: test/Sema/warn-conditional-emum-types-mismatch.c:19 + +int get_flag_anon_enum(int cond) { + return cond ? A :

[PATCH] D67545: [clang-tidy] Added DefaultOperatorNewCheck.

2019-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Herald added a subscriber: hiraditya. Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:68-70 +// MEM +CheckFactories.registerCheck( +"cert-mem57-cpp"); The `MEM` section should come before `MSC`

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:90-106 + FnCheck identifyCall(const CallEvent &Call, CheckerContext &C, + const CallExpr *CE) const; + + void evalFopen(CheckerContext &C, const CallExpr *CE) const;

[PATCH] D64671: [clang-tidy] New check: misc-init-local-variables

2019-09-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Do you need someone to commit this on your behalf (sorry for not asking that question sooner)? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64671/new/ https://reviews.llvm.org/D64671 ___ cfe-commits mailing

Re: r373247 - Teach CallGraph to look into Generic Lambdas.

2019-09-30 Thread Nico Weber via cfe-commits
This broke a few clangd unit tests: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/38857/steps/ninja%20check%201/logs/FAIL%3A%20Clangd%20Unit%20Tests%3A%3AHover.Structured http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/38857/steps/ninja%20check%201/logs/FAIL%3A%20Clangd

RE: r373247 - Teach CallGraph to look into Generic Lambdas.

2019-09-30 Thread Keane, Erich via cfe-commits
I saw that, thanks! I’m looking into them now. I can revert if it takes me too long. From: Nico Weber Sent: Monday, September 30, 2019 12:50 PM To: Keane, Erich Cc: cfe-commits Subject: Re: r373247 - Teach CallGraph to look into Generic Lambdas. This broke a few clangd unit tests: http://l

[PATCH] D67919: [Diagnostics] Warn if enumeration type mismatch in conditional expression

2019-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 222478. xbolva00 marked an inline comment as done. xbolva00 added a comment. Added comment why we differ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67919/new/ https://reviews.llvm.org/D67919 Files: lib/Sema/SemaChecking.cpp test/Sema/warn-c

r373252 - [Diagnostics] Warn if enumeration type mismatch in conditional expression

2019-09-30 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Sep 30 12:55:50 2019 New Revision: 373252 URL: http://llvm.org/viewvc/llvm-project?rev=373252&view=rev Log: [Diagnostics] Warn if enumeration type mismatch in conditional expression Summary: - Useful warning - GCC compatibility (GCC warns in C++ mode) Reviewers: rsmith

[PATCH] D67919: [Diagnostics] Warn if enumeration type mismatch in conditional expression

2019-09-30 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373252: [Diagnostics] Warn if enumeration type mismatch in conditional expression (authored by xbolva00, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prio

[PATCH] D68199: [analyzer] DynamicTypeInfo: Simplify the API

2019-09-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I actually like the idea, it makes it consistent with other maps. But you'll need to clean up memory management here. Given that you can't modify the state in `getDynamicTypeInfo()`, i guess you'll have to resort to smart pointers. Comment at: clang/lib/S

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D67079#1687577 , @Charusso wrote: > - `CastVisitor` is the new facility which decides whether the assumptions are > appropriate. > - The math is still WIP. You need the math to decide whether delaying the decision to a visitor is

[PATCH] D68227: [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

2019-09-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/lib/Format/Format.cpp:1891 + if (compareIgnoringCarriageReturns( + result, Code.substr(IncludesBeginOffset, IncludesBlockSize))) return; Here `compartIgnoringCarriageReturns` is a bit imprecise: the

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 2 inline comments as done. Charusso added a comment. In D67079#1688648 , @NoQ wrote: > In D67079#1687577 , @Charusso wrote: > > > - `CastVisitor` is the new facility which decides whether the assumpt

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/cast-value-hierarchy-fp-suppression.cpp:25-27 + if (isa(a)) +if (isa(a)) + clang_analyzer_warnIfReached(); // no-warning Charusso wrote: > NoQ wrote: > > Why is `(isa(a) && isa(a))` deemed possi

r373256 - [NFCI] Updated broken test

2019-09-30 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Sep 30 13:23:22 2019 New Revision: 373256 URL: http://llvm.org/viewvc/llvm-project?rev=373256&view=rev Log: [NFCI] Updated broken test Modified: cfe/trunk/test/SemaCXX/warn-sign-conversion.cpp Modified: cfe/trunk/test/SemaCXX/warn-sign-conversion.cpp URL: http://l

[PATCH] D68227: [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

2019-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Through experiments, I notice that both result and the Code contains "\r\n", because although we construct the results with "\n" the actual text of the include has I believe trailing "\r" or "\r\n", I notice this when I thought one fix I tried was to trim the inc

[PATCH] D68185: [Diagnostics] Warn when class implements a copy constructor/copy assignment operator, but missing the copy assignment operator/copy constructor

2019-09-30 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. +1 for clang-tidy. GCC's closest to this is -Weffc++ which limits the rule of 3 warning to only "classes that have dynamic memory allocation" (though I'm not sure exactly what conditions it uses to decide that - it doesn't warn on anything in the test cases provided in

[PATCH] D68242: [clang-format] [PR42417] clang-format inserts a space after '->' for operator->() overloading

2019-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: klimek, owenpan, byoungyoung. MyDeveloperDay added a project: clang-format. Herald added a project: clang. https://bugs.llvm.org/show_bug.cgi?id=42417 This revision removes the extra space between the opertor-> and the parens (

r373257 - [OPENMP50]Mark declare variant attribute as inheritable.

2019-09-30 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Sep 30 13:39:29 2019 New Revision: 373257 URL: http://llvm.org/viewvc/llvm-project?rev=373257&view=rev Log: [OPENMP50]Mark declare variant attribute as inheritable. Attribute must be inherited by the redeclarations. Modified: cfe/trunk/include/clang/Basic/Attr.td

r373258 - [NFC] Fix tests, second try

2019-09-30 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Mon Sep 30 13:41:56 2019 New Revision: 373258 URL: http://llvm.org/viewvc/llvm-project?rev=373258&view=rev Log: [NFC] Fix tests, second try Modified: cfe/trunk/test/SemaCXX/warn-sign-conversion.cpp Modified: cfe/trunk/test/SemaCXX/warn-sign-conversion.cpp URL: http://

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 3 inline comments as done. Charusso added inline comments. Comment at: clang/test/Analysis/cast-value-hierarchy-fp-suppression.cpp:25-27 + if (isa(a)) +if (isa(a)) + clang_analyzer_warnIfReached(); // no-warning NoQ wrote: > Charusso wro

r373259 - Fix failure caused by r373247

2019-09-30 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Sep 30 13:45:12 2019 New Revision: 373259 URL: http://llvm.org/viewvc/llvm-project?rev=373259&view=rev Log: Fix failure caused by r373247 I incorrectly thought that the 'isLambda' check never fired, so when splitting up a helper function, I lost the 'nullptr' return v

RE: r373247 - Teach CallGraph to look into Generic Lambdas.

2019-09-30 Thread Keane, Erich via cfe-commits
Should be fixe din r373259 From: Nico Weber Sent: Monday, September 30, 2019 12:50 PM To: Keane, Erich Cc: cfe-commits Subject: Re: r373247 - Teach CallGraph to look into Generic Lambdas. This broke a few clangd unit tests: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/38857/st

Re: r373258 - [NFC] Fix tests, second try

2019-09-30 Thread Roman Lebedev via cfe-commits
I'm just wondering, was this not caught in `ninja check-clang` before the patch that added the warning landed? On Mon, Sep 30, 2019 at 11:39 PM David Bolvansky via cfe-commits wrote: > > Author: xbolva00 > Date: Mon Sep 30 13:41:56 2019 > New Revision: 373258 > > URL: http://llvm.org/viewvc/llvm-

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/cast-value-hierarchy-fp-suppression.cpp:25-27 + if (isa(a)) +if (isa(a)) + clang_analyzer_warnIfReached(); // no-warning Charusso wrote: > NoQ wrote: > > Charusso wrote: > > > NoQ wrote: > > > >

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping @ABataev Any comments? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[PATCH] D68055: Add -fgnuc-version= to control __GNUC__ and other GCC macros

2019-09-30 Thread Jacob Lifshay via Phabricator via cfe-commits
programmerjake added a comment. Shouldn't `__GNUG__` match `__GNUC__`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68055/new/ https://reviews.llvm.org/D68055 ___ cfe-commits mailing list cfe-commits@

[PATCH] D68227: [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

2019-09-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 222498. MyDeveloperDay added a comment. Being specific about replacing "\r\n"'s with "\n"'s rather than removing just \r's CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68227/new/ https://reviews.llvm.org/D68227 Files: clang/lib/Format/Fo

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/cast-value-hierarchy-fp-suppression.cpp:25-27 + if (isa(a)) +if (isa(a)) + clang_analyzer_warnIfReached(); // no-warning NoQ wrote: > Charusso wrote: > > NoQ wrote: > > > Charusso wrote: > > > >

[PATCH] D67079: [analyzer] CastValueChecker: Model inheritance

2019-09-30 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked 4 inline comments as done. Charusso added inline comments. Comment at: clang/test/Analysis/cast-value-hierarchy-fp-suppression.cpp:25-27 + if (isa(a)) +if (isa(a)) + clang_analyzer_warnIfReached(); // no-warning NoQ wrote: > NoQ wrote: >

r373268 - Make function static that didn't need linkage.

2019-09-30 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Mon Sep 30 14:24:04 2019 New Revision: 373268 URL: http://llvm.org/viewvc/llvm-project?rev=373268&view=rev Log: Make function static that didn't need linkage. In r373247 I added a helper function, but neglected to make it static. Modified: cfe/trunk/lib/AST/DeclCXX.c

[PATCH] D68182: [Clangd] Ensure children are always RootStmt in ExtractFunction (Fixes #153)

2019-09-30 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah updated this revision to Diff 222499. SureYeaah added a comment. Moved Unittest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68182/new/ https://reviews.llvm.org/D68182 Files: clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cp

[PATCH] D68187: [libclang] Use strict prototypes in header

2019-09-30 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert abandoned this revision. aaronpuchert added a comment. Fixed by @aaron.ballman in rC373213 along with another issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68187/new/ https://reviews.llvm.org

[PATCH] D67113: ICK_Function_Conversion is a third kind conversion

2019-09-30 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67113/new/ https://reviews.llvm.org/D67113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D68245: [Clangd] ExtractFunction: Don't extract body of enclosing function.

2019-09-30 Thread Shaurya Gupta via Phabricator via cfe-commits
SureYeaah created this revision. SureYeaah added reviewers: sammccall, kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This patch disable extraction of the body of the enclosing function. `void f() [[{}]]` Extr

  1   2   >