[PATCH] D59682: [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc.

2019-03-22 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: RKSimon, spatel. Herald added a project: clang. Herald added a subscriber: cfe-commits. These are all implemented by icc as well. I made bit_scan_forward/reverse forward to the __bsfd/__bsrq since we also have __bsfq/__bsrq. Note,

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D59279#1438514 , @mgrang wrote: > Although, as you rightly pointed out that //ordered// sets of pointers are as > non-deterministic as //unordered// ones. What if you store pointers to the elements of an array? In that case

[PATCH] D17407: [Sema] PR25755 Fix crash when initializing out-of-order struct references

2019-03-22 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 191828. hintonda added a comment. Herald added a subscriber: jdoerfert. Herald added a project: clang. - Initial checkin from original D17407 . - Refactored code and simplify tests based on review comments. Repository: rG

[PATCH] D17407: [Sema] PR25755 Handle out of order designated initializers

2019-03-22 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Please check also https://bugs.llvm.org/show_bug.cgi?id=40030 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D17407/new/ https://reviews.llvm.org/D17407 ___ cfe-commits mailing

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:7738 +Expected ASTImporter::ImportInternal(Decl *FromD) { + // Import the declaration. + ASTNodeImporter Importer(*this); Comment can be better: Import it using ASTNodeImporter. ===

[PATCH] D17407: [Sema] PR25755 Handle out of order designated initializers

2019-03-22 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. In D17407#1439029 , @xbolva00 wrote: > Please check also https://bugs.llvm.org/show_bug.cgi?id=40030 Thanks for pointing that out. I was mainly handling asserts, but will add the restrictions as well. Repository: rG LLVM G

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/Diagnostics.cpp:396 + for (llvm::StringRef Inc : IncludeStack) +OS << "In file included from: " << Inc << ":\n"; +} ilya-biryukov wrote: > NIT: could we reuse the function from clang

[PATCH] D59302: [clangd] Surface diagnostics from headers inside main file

2019-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 191831. kadircet marked 8 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302 Files: clangd/ClangdUn

[PATCH] D59683: [Tooling] Avoid working-dir races in AllTUsToolExecutor

2019-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: ioeric. Herald added a subscriber: jdoerfert. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D59683 Files: clang/lib/Tooling/AllTUsExecution.cpp Index: clang/lib/Tooling/AllTUs

[PATCH] D59683: [Tooling] Avoid working-dir races in AllTUsToolExecutor

2019-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. This breaks lots of stuff, need to figure out why this happens :-( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59683/new/ https://reviews.llvm.org/D59683 __

[PATCH] D59639: [clangd] Print template arguments helper

2019-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/unittests/clangd/ASTUtilsTests.cpp:1 +#include "AST.h" +#include "Annotations.h" NIT: add a licence header Comment at: clang-tools-extra/unittests/clangd/CMakeLists.txt:13 An

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Shafik, Thank you for looking into this. This is indeed a bug, because whenever a we encounter an unnamed EnumDecl in the "from" context then we return with a nameconflict error. However, I think we should fix this differently. First of all, currently HandleNameConfl

[PATCH] D59684: [clang-format] [PR41187] moves Java import statements to the wrong location if code contains statements that start with the word import

2019-03-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: djasper, klimek, mprobst, reuk, JonasToth. MyDeveloperDay added a project: clang-tools-extra. Import sorting of java file, incorrectly move import statement to after a function beginning with the word import. Make 1 character

[PATCH] D59639: [clangd] Print template arguments helper

2019-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:26 +llvm::Optional> +getTemplateSpecializationArgLocs(const NamedDecl &ND) { + if (auto *Func = llvm::dyn_cast(&ND)) { Eugene.Zelenko wrote: > Functions should be static, not in an

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D59665#1438911 , @a_sidorin wrote: > Hi Shafik, > > Honestly, I was always wondering what does HandleNameConflict actually do. > Its implementation in ASTImporter is trivial and I don't see any of its > overrides in LLDB code

[PATCH] D59683: [Tooling] Avoid working-dir races in AllTUsToolExecutor

2019-03-22 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. False alarm, I was running tests on top of a previously broken revision. Everything seems to work just fine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59683/new/ https://reviews.llvm.org/D59683

[PATCH] D59683: [Tooling] Avoid working-dir races in AllTUsToolExecutor

2019-03-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Neat! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59683/new/ https://reviews.llvm.org/D59683 __

[PATCH] D59615: [AArch64] When creating SISD intrinsic calls widen scalar args into a zero vectors, not undef

2019-03-22 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. Did you look into a scalar variant of the intrinsic call instead? These instructions have non-vector variants (e.g. `sqadd s0, s0, s0`), and that's actually why the intrinsics exist in the first place. It'd be a shame to always require this extra work. Repositor

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 191844. kadircet marked 11 inline comments as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59481/new/ https://reviews.llvm.org/D59481 Files: clang-tools-e

[PATCH] D59481: [clangd] Count number of references while merging RefSlabs inside FileIndex

2019-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:46 +auto It = MergedSyms->find(Sym.first); +assert(It != MergedSyms->end() && "Reference to unknown symbol!"); +// Note that we increment References per each file ment

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > @martong It's not related to lookup or anything like that, it's just that we > don't have enough information in our debug info AST to allow people to use > meta programming. The custom logic we have in LLDB looks into the std C++ > module to fill out these gaps in the

r356742 - [ARM] Add Cortex-M35P Support

2019-03-22 Thread Luke Cheeseman via cfe-commits
Author: lukecheeseman Date: Fri Mar 22 03:58:15 2019 New Revision: 356742 URL: http://llvm.org/viewvc/llvm-project?rev=356742&view=rev Log: [ARM] Add Cortex-M35P Support - Add clang frontend testing for Cortex-M35P Differential Revision: https://reviews.llvm.org/D57765 Modified: cfe/trunk/

[PATCH] D57765: [ARM] Add Cortex-M35P Support

2019-03-22 Thread Luke Cheeseman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356742: [ARM] Add Cortex-M35P Support (authored by LukeCheeseman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

r356743 - [Tooling] Avoid working-dir races in AllTUsToolExecutor

2019-03-22 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Mar 22 04:01:13 2019 New Revision: 356743 URL: http://llvm.org/viewvc/llvm-project?rev=356743&view=rev Log: [Tooling] Avoid working-dir races in AllTUsToolExecutor Reviewers: ioeric Reviewed By: ioeric Subscribers: jdoerfert, cfe-commits Tags: #clang Differential R

[PATCH] D59683: [Tooling] Avoid working-dir races in AllTUsToolExecutor

2019-03-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356743: [Tooling] Avoid working-dir races in AllTUsToolExecutor (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D59639: [clangd] Print template arguments helper

2019-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 15 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:88 static const TemplateArgumentList * getTemplateSpecializationArgs(const NamedDecl &ND) { if (auto *Func = llvm::dyn_cast(&ND)) ioeric

[PATCH] D59639: [clangd] Print template arguments helper

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

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 191859. teemperor marked 4 inline comments as done. teemperor added a comment. - Addressed feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59485/new/ https://reviews.llvm.org/D59485 Files: clang/include/clang/AST/ASTImporter.h clang/l

[PATCH] D59640: [clangd] Add TemplateArgumentList into Symbol

2019-03-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D59640#1438248 , @ioeric wrote: > should we update YAML? I suppose we are only keeping it alive for the sake of tests, but that seems like an enough reason updating that as well. Comment at: clang-tools-e

[PATCH] D59640: [clangd] Add TemplateArgumentList into Symbol

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

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Gauthier via Phabricator via cfe-commits
Tyker updated this revision to Diff 191862. Tyker added a comment. handled codegen for if, while, for and do/while, it will generate a @llvm.expect before the condition based on the attribute i changed slithly the semantic if (...) { //error [[likely]] ... } if (...) [[likely]] { //

[PATCH] D59650: [NFC] ExceptionEscapeCheck: small refactoring

2019-03-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tidy/utils/ExceptionAnalyzer.cpp:208 +template <> +void ExceptionAnalyzer::analyze(const FunctionDecl *Func, +ExceptionInfo &ExceptionList) { I'd suggest to make it a non-template

[PATCH] D59692: [ASTImporter] Fix name conflict handling

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, shafik, teemperor. Herald added subscribers: cfe-commits, jdoerfert, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. martong added a parent revision: D55049: Changed every

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added inline comments. Comment at: clang-tidy/openmp/ExceptionEscapeCheck.cpp:53 + Finder->addMatcher(ompExecutableDirective( + unless(isStandaloneDirective()), + hasStructuredB

[PATCH] D55049: Changed every use of ASTImporter::Import to Import_New

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Herald added a reviewer: martong. Herald added a project: clang. Comment at: lib/AST/ASTImporter.cpp:7767 + if (!ToDCOrErr) +return ToDCOrErr.takeError(); + auto *ToDC = cast(*ToDCOrErr); Actually, this patch is not merely a `

[PATCH] D55049: Changed every use of ASTImporter::Import to Import_New

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: a_sidorin. martong added a comment. Herald added a subscriber: rnkovacs. Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55049/new/ https://reviews.llvm.org/D55049 ___ cfe-commits mailing

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a reviewer: a_sidorin. martong added a subscriber: a_sidorin. martong added a comment. @shafik, @a_sidorin Ping. Could you please take a look? Guys, this and its child patch are very important patches, because without it the error handling of ASTImporter is not completed. This means

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang-tools-extra/clangd/index/Relation.h:1 +//===--- Ref.h ---*- C++-*-===// +// gribozavr wrote: > "--- Relation.h " Not done? C

[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

2019-03-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr marked an inline comment as done. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp:166 +Preprocessor->Lex(CurrentToken); +

[PATCH] D59665: Call to HandleNameConflict in VisitEnumDecl mistakeningly using Name instead of SearchName

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I am aware of similar errors like this with other AST nodes. We had a patch > in our fork to fix that in January > (https://github.com/Ericsson/clang/pull/569/files) I am going to prepare a > patch from that cause I see now this affects you guys in LLDB too. Just cre

[PATCH] D59682: [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc.

2019-03-22 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: lib/Headers/ia32intrin.h:31 +static __inline__ int __attribute__((__always_inline__, __nodebug__)) +__bsfd(int __A) { Ideally we'd have doxygen comments. Comment at: test/CodeGen/bitscan-builtins.c:2

[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

2019-03-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh marked 3 inline comments as done. alexfh added inline comments. Comment at: clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp:166 +Preprocessor->Lex(CurrentToken); +} + gribozavr wrote: > Haha, so the test that I asked to add did catch a

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. > Well, I still don't understand how LLDB synthesis the AST. > So you have a C++ module in a .pcm file. This means you could create an AST > from that with ASTReader from it's .clang_ast section, right? In that case > the AST should be complete with all type informat

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 191870. lebedev.ri marked 6 inline comments as done. lebedev.ri added a comment. Address some nits. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59466/new/ https://reviews.llvm.org/D59466 Files: clang-tid

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/openmp/ExceptionEscapeCheck.cpp:53 + Finder->addMatcher(ompExecutableDirective( + unless(isStandaloneDirective()), + hasStructuredBlock(stmt().bind("structured-block")))

[PATCH] D59650: [NFC] ExceptionEscapeCheck: small refactoring

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 191868. lebedev.ri marked 3 inline comments as done. lebedev.ri added a comment. Address some nits. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59650/new/ https://reviews.llvm.org/D59650 Files: clang-tid

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new check

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 191869. lebedev.ri added a comment. Address some nits. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57113/new/ https://reviews.llvm.org/D57113 Files: clang-tidy/openmp/CMakeLists.txt clang-tidy/openmp/O

[PATCH] D59650: [NFC] ExceptionEscapeCheck: small refactoring

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/utils/ExceptionAnalyzer.cpp:226 +ExceptionAnalyzer::ExceptionInfo +ExceptionAnalyzer::analyzeBoilerplate(const T *Node) { + ExceptionInfo ExceptionList; gribozavr wrote: > JonasToth wrote: > > lebedev.ri w

[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

2019-03-22 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh updated this revision to Diff 191871. alexfh marked an inline comment as done. alexfh added a comment. - - Update a comment according to the review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59528/new/ https://reviews.llvm.org/D

[PATCH] D57687: [clang-format] Add style option AllowShortLambdasOnASingleLine

2019-03-22 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler updated this revision to Diff 191872. rdwampler added a comment. Rebased on master. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57687/new/ https://reviews.llvm.org/D57687 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/Forma

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Additionally I think that you need to: - add tests for templates - handle the ternary operator Also, as per the coding guidelines, you need to fix: - spelling of variables, eg `hint` -> `Hint`. - run `clang-format` on your patch. Comment at: clang

r356749 - [AST] OMPStructuredBlockTest: avoid using multiline string literals in macros

2019-03-22 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Fri Mar 22 06:40:36 2019 New Revision: 356749 URL: http://llvm.org/viewvc/llvm-project?rev=356749&view=rev Log: [AST] OMPStructuredBlockTest: avoid using multiline string literals in macros That is what i have been doing elsewhere in these tests, maybe that's it? Maybe th

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: clang/lib/Sema/SemaStmtAttr.cpp:74 + ControlScope->getFlags() & Scope::FnTryCatchScope) + S.Diag(A.getLoc(), diag::err_must_appear_after_branch) << A.getName(); + } I think that you need to test for each

[clang-tools-extra] r356750 - [clang-tidy] Expand modular headers for PPCallbacks

2019-03-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Mar 22 06:42:48 2019 New Revision: 356750 URL: http://llvm.org/viewvc/llvm-project?rev=356750&view=rev Log: [clang-tidy] Expand modular headers for PPCallbacks Summary: Add a way to expand modular headers for PPCallbacks. Checks can opt-in for this expansion by overriding

[PATCH] D59528: [clang-tidy] Expand modular headers for PPCallbacks

2019-03-22 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. alexfh marked an inline comment as done. Closed by commit rL356750: [clang-tidy] Expand modular headers for PPCallbacks (authored by alexfh, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commi

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D59076#1438479 , @riccibruno wrote: > This is causing https://bugs.llvm.org/show_bug.cgi?id=41171. @modocache Could you take a look please ? Nested scopes in a catch statement are completely broken because of this patch.

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr marked an inline comment as done. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang-tidy/openmp/ExceptionEscapeCheck.cpp:53 + Finder->addMatcher(ompExecutableDirective( +

[PATCH] D59639: [clangd] Print template arguments helper

2019-03-22 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:26 +llvm::Optional> +getTemplateSpecializationArgLocs(const NamedDecl &ND) { + if (auto *Func = llvm::dyn_cast(&ND)) { ilya-biryukov wrote: > Eugene.Zelenko wrote: > > Functions s

[PATCH] D59650: [NFC] ExceptionEscapeCheck: small refactoring

2019-03-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr marked an inline comment as done. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang-tidy/utils/ExceptionAnalyzer.cpp:226 +ExceptionAnalyzer::ExceptionInfo +ExceptionAnalyzer::analyzeBoil

[PATCH] D59650: [NFC] ExceptionEscapeCheck: small refactoring

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked an inline comment as done. lebedev.ri added a comment. @gribozavr thank you for the review! @baloghadamsoftware any comments? Comment at: clang-tidy/utils/ExceptionAnalyzer.cpp:226 +ExceptionAnalyzer::ExceptionInfo +ExceptionAnalyzer::analyzeBoilerplate(const

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Hmm, it seems that an attribute is not allowed by the grammar in the `expression` or `assignment-expression` of a `conditional-expression`. Was that intended when `[[likely]]` was added ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59467/new/ https://revi

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a comment. Adding Richard for design strategy discussion. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8164 +def err_must_appear_after_branch : Error< + "%0 can only appear after a selection or iterati

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59467#1439473 , @riccibruno wrote: > Hmm, it seems that an attribute is not allowed by the grammar in the > `expression` or `assignment-expression` of a `conditional-expression`. Was > that intended when `[[likely]]` wa

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D59467#1439485 , @aaron.ballman wrote: > In D59467#1439473 , @riccibruno > wrote: > > > Hmm, it seems that an attribute is not allowed by the grammar in the > > `expression` or `ass

[PATCH] D57687: [clang-format] Add style option AllowShortLambdasOnASingleLine

2019-03-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57687/new/ https://reviews.llvm.org/D57687 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/openmp/ExceptionEscapeCheck.cpp:32 + llvm::StringSet<> IgnoredExceptions; + StringRef(RawIgnoredExceptions).split(IgnoredExceptionsVec, ",", -1, false); + IgnoredExceptions.insert(IgnoredExceptionsVec.begin(), ---

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new check

2019-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/openmp/UseDefaultNoneCheck.cpp:47-48 +diag(Directive->getBeginLoc(), + "OpenMP directive '%0' specifies 'default(%1)' clause. Consider using " + "'default(none)' clause instead.") +<< getOpen

[PATCH] D59650: [NFC] ExceptionEscapeCheck: small refactoring

2019-03-22 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked an inline comment as done. gribozavr added inline comments. Comment at: clang-tidy/utils/ExceptionAnalyzer.cpp:226 +ExceptionAnalyzer::ExceptionInfo +ExceptionAnalyzer::analyzeBoilerplate(const T *Node) { + ExceptionInfo ExceptionList; lebedev.r

[PATCH] D59650: [NFC] ExceptionEscapeCheck: small refactoring

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri marked an inline comment as done. lebedev.ri added inline comments. Comment at: clang-tidy/utils/ExceptionAnalyzer.cpp:226 +ExceptionAnalyzer::ExceptionInfo +ExceptionAnalyzer::analyzeBoilerplate(const T *Node) { + ExceptionInfo ExceptionList; griboza

r356752 - [OPENMP]Emit error message for allocate directive without allocator

2019-03-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Mar 22 07:41:39 2019 New Revision: 356752 URL: http://llvm.org/viewvc/llvm-project?rev=356752&view=rev Log: [OPENMP]Emit error message for allocate directive without allocator clause in target region. According to the OpenMP 5.0, 2.11.3 allocate Directive, Restrictions,

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 2 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Relation.h:1 +//===--- Ref.h ---*- C++-*-===// +// gribozavr wrote: > gribozavr wrote: > > "--- Rela

[clang-tools-extra] r356756 - [clang-tidy] Fix a compiler warning.

2019-03-22 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Mar 22 08:07:18 2019 New Revision: 356756 URL: http://llvm.org/viewvc/llvm-project?rev=356756&view=rev Log: [clang-tidy] Fix a compiler warning. Rename the Preprocessor field to fix the declaration of ‘std::unique_ptr clang::tooling::ExpandModularHeadersPPCallbacks::P

[PATCH] D57687: [clang-format] Add style option AllowShortLambdasOnASingleLine

2019-03-22 Thread Ronald Wampler via Phabricator via cfe-commits
rdwampler added a comment. I don't have commit rights, can someone land this for me or would it be better to try and get commit access? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57687/new/ https://reviews.llvm.org/D57687 ___ cfe-commit

r356758 - [OPENMP]Allow no allocator clause in target regions with requires

2019-03-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Mar 22 08:25:12 2019 New Revision: 356758 URL: http://llvm.org/viewvc/llvm-project?rev=356758&view=rev Log: [OPENMP]Allow no allocator clause in target regions with requires dynamic_allocators. According to the OpenMP 5.0, 2.11.3 allocate Directive, Restrictions, allocat

[PATCH] D59360: [clang-tidy] Fix more false positives for bugprone-string-integer-assignment

2019-03-22 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked 2 inline comments as done. courbet added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StringIntegerAssignmentCheck.cpp:115 +Expr::EvalResult EvalResult; +if (!E->EvaluateAsInt(EvalResult, Ctx, Expr::SE_AllowSideEffects)) + return

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterTest.cpp:583 + // Returns a ImporterConstructor that constructs this class. + static ASTImporterOptionSpecificTestBase::ImporterConstructor + getConstructor() { balazske wrote: > Is it

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D59485#1439390 , @teemperor wrote: > > Well, I still don't understand how LLDB synthesis the AST. > > So you have a C++ module in a .pcm file. This means you could create an > > AST from that with ASTReader from it's .clang_a

[PATCH] D59360: [clang-tidy] Fix more false positives for bugprone-string-integer-assignment

2019-03-22 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 191885. courbet added a comment. Ignore template contexts and add a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59360/new/ https://reviews.llvm.org/D59360 Files: clang-tools-extra/clang-tidy/bugprone

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-22 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 191886. nridge added a comment. Scrapped 'struct Relation' and addressed other comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59407/new/ https://reviews.llvm.org/D59407 Files: clang-tools-extra/clangd

r356759 - [OPENMP]Add missing comment, NFC.

2019-03-22 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Mar 22 08:32:02 2019 New Revision: 356759 URL: http://llvm.org/viewvc/llvm-project?rev=356759&view=rev Log: [OPENMP]Add missing comment, NFC. Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp URL: http://llvm.org/viewvc/llvm-pr

[PATCH] D59639: [clangd] Print template arguments helper

2019-03-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clangd/AST.cpp:149 +} else { + // FIXME: Fix cases when getTypeAsWritten returns null, e.g. friend decls. + printTemplateArgumentList(OS, Cls->getTemplateArgs().asArray(), Policy); I'm not

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Gauthier via Phabricator via cfe-commits
Tyker added a comment. about the semantic issue. we will need for diagnostics purposes to detect attribute in branches during the semantic phase. so where and how can we store this information in the AST so that the CodeGen doesn't have to look through branches again for this attributes ? CHA

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 191892. lebedev.ri marked 15 inline comments as done. lebedev.ri added a comment. Addressed some nits. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59466/new/ https://reviews.llvm.org/D59466 Files: clang-

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-03-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:482 + // containing any matching token to be aligned and located after such token. + auto AlignCurrentSequence = [&] { +if (StartOfSequence > 0 && StartOfSequence < EndOfSequence) {

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-03-22 Thread Nick Renieris via Phabricator via cfe-commits
VelocityRa updated this revision to Diff 191891. VelocityRa added a comment. Right, how's that? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28462/new/ https://reviews.llvm.org/D28462 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp l

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/openmp/ExceptionEscapeCheck.cpp:53 + Finder->addMatcher(ompExecutableDirective( + unless(isStandaloneDirective()), + hasStructuredBlock(stmt().bind("structured-block")))

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-22 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. I'm pushing a revert. Sorry for the trouble! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59076/new/ https://reviews.llvm.org/D59076 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-22 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Sorry for the late response, I'm looking now. Should I revert this for now? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59076/new/ https://reviews.llvm.org/D59076 ___ cfe-commits mailing

[PATCH] D59466: [clang-tidy] openmp-exception-escape - a new check

2019-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/openmp/ExceptionEscapeCheck.cpp:48 +return; + // Similarly, if C++ Exceptions are not enabled, nothing to do. + if (!getLangOpts().CPlusPlus || !getLangOpts().CXXExceptions) lebedev.ri wrote: > aar

r356774 - Revert "[coroutines][PR40978] Emit error for co_yield within catch block"

2019-03-22 Thread Brian Gesiak via cfe-commits
Author: modocache Date: Fri Mar 22 09:08:29 2019 New Revision: 356774 URL: http://llvm.org/viewvc/llvm-project?rev=356774&view=rev Log: Revert "[coroutines][PR40978] Emit error for co_yield within catch block" The commit https://reviews.llvm.org/rC356296 is causing a regression in nested catch sc

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-22 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Reverted in rC356296 . I'll rework this change along with a test confirming https://bugs.llvm.org/show_bug.cgi?id=41171 doesn't occur. Apologies! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59076/ne

[PATCH] D59485: [ASTImporter] Add an ImportInternal method to allow customizing Import behavior.

2019-03-22 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D59485#1439570 , @martong wrote: > In D59485#1439390 , @teemperor wrote: > > > > Well, I still don't understand how LLDB synthesis the AST. > > > So you have a C++ module in a .pcm file

[PATCH] D59700: Make clang-move use same file naming convention as other tools

2019-03-22 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hokein. Herald added subscribers: llvm-commits, ioeric, mgorny. Herald added a project: LLVM. In all the other clang-foo tools, the main library file is called Foo.cpp and the file in the tool/ folder is called ClangFoo.cpp. Do this for clang-

[PATCH] D59700: Make clang-move use same file naming convention as other tools

2019-03-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59700/new/ https://reviews.llvm.org/D59700 ___ cfe-commits mailing list cfe-commits@l

r356776 - [ARM] Fix bug 39982 - pcs("aapcs-vfp") is not consistent

2019-03-22 Thread Carey Williams via cfe-commits
Author: carwil Date: Fri Mar 22 09:20:45 2019 New Revision: 356776 URL: http://llvm.org/viewvc/llvm-project?rev=356776&view=rev Log: [ARM] Fix bug 39982 - pcs("aapcs-vfp") is not consistent Correctly handle homogeneous aggregates when a function's ABI is specified via the pcs attribute. Bug: htt

[PATCH] D59094: [ARM] Fix bug 39982 - pcs("aapcs-vfp") is not consistent

2019-03-22 Thread Carey Williams via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356776: [ARM] Fix bug 39982 - pcs("aapcs-vfp") is not consistent (authored by carwil, committed by ). Changed prior to commit: https://reviews.llvm.org/D59094?vs=190798&id=191895#toc Repository: rC C

[PATCH] D59233: libclang/CIndexer.cpp: Use loadquery() on AIX for path to library

2019-03-22 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast marked 6 inline comments as done. hubert.reinterpretcast added a comment. Herald added a subscriber: jsji. Thanks @xingxue for the review. I will update for the error handling before committing. Comment at: tools/libclang/CIndexer.cpp:61 +if (errno !

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59467#1439585 , @Tyker wrote: > about the semantic issue. > with the standard's latitude on where we can put the attribute, the > attribute can appear any where on the path of execution and must be matched > with the c

[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-03-22 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru created this revision. sylvestre.ledru added a reviewer: atanasyan. Herald added subscribers: llvm-commits, Sanitizers, jdoerfert, delcypher, arichardson, dberris, kubamracek, sdardis. Herald added projects: LLVM, Sanitizers. sylvestre.ledru added a comment. Not sure what I am doi

[PATCH] D59702: Unbreak the build of compiler-rt on Linux/mips64el

2019-03-22 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. Not sure what I am doing but it fixes the issue Repository: rCRT Compiler Runtime CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59702/new/ https://reviews.llvm.org/D59702 ___ cfe-commits mailing list cfe-

  1   2   >