[PATCH] D55616: Emit ASM input in a constant context

2019-04-16 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Herald added a project: clang. This change apparently introduced a regression: https://bugs.llvm.org/show_bug.cgi?id=41027 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55616/new/ https://reviews.llvm.org/D55616 ___

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

2019-04-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Ping Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D60739: [analyzer] NFC: Re-use reusable unittest mocks.

2019-04-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Yes please!! Wanted to do this for `RegisterCustomCheckers.cpp` for a while (moving the general stuff to a header file), to have unit tests for checker dependencies, but I'll sort that o

[PATCH] D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO

2019-04-16 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. sberg added reviewers: filcab, marxin, rsmith. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, kristof.beyls, javed.absar, kubamracek. Herald added projects: clang, Sanitizers, LLVM. This follows up after b7692bc3e9ad2691fc07261904b88fb15f30696b

[PATCH] D60760: Adapt -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO

2019-04-16 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg marked an inline comment as done. sberg added inline comments. Comment at: compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc:264 + return SANITIZER_NON_UNIQUE_TYPEINFO && TI1->__type_name[0] != '*' && + TI2->__type_name[0] != '*' && + !internal_strcmp(TI1->_

[PATCH] D44352: [Concepts] Constrained template parameters

2019-04-16 Thread Gabor Marton via Phabricator via cfe-commits
martong requested changes to this revision. martong added inline comments. This revision now requires changes to proceed. Herald added a subscriber: rnkovacs. Comment at: lib/AST/ASTImporter.cpp:3708 + if (Expr *CE = D->getConstraintExpression()) +R->setConstraintExpression(

[PATCH] D41910: [Concepts] Constrained partial specializations and function overloads.

2019-04-16 Thread Gabor Marton via Phabricator via cfe-commits
martong requested changes to this revision. martong added a reviewer: balazske. martong added inline comments. This revision now requires changes to proceed. Comment at: lib/AST/ASTImporter.cpp:5026 +ClassTemplate->findPartialSpecialization(TemplateArgs, +Part

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

2019-04-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry, lost this revision. Looking now Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59302/new/ https://reviews.llvm.org/D59302 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D43357: [Concepts] Function trailing requires clauses

2019-04-16 Thread Gabor Marton via Phabricator via cfe-commits
martong requested changes to this revision. martong added inline comments. This revision now requires changes to proceed. Comment at: lib/AST/ASTImporter.cpp:3053 +D->isInlineSpecified(), D->isImplicit(), D->isConstexpr(), +InheritedConstructor(), FromConstructor-

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-16 Thread Pierre via Phabricator via cfe-commits
Pierre created this revision. Pierre added reviewers: Anastasia, svenvh. Herald added subscribers: cfe-commits, yaxunl, mgorny. Herald added a project: clang. **This is a re-upload of the patch from Joey GOULY, posted at: https://reviews.llvm.org/D53023 . I am re-uploading it because I will conti

[PATCH] D60605: [clangd] Revamp textDocument/onTypeFormatting.

2019-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 195338. sammccall added a comment. Lots more test cases and better handling of braced blocks. This turns out to be an interesting case: if (foo) { ^} Really the right thing to do here is insert another newline. Unfortuantely that means inserting text

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-16 Thread Pierre via Phabricator via cfe-commits
Pierre updated this revision to Diff 195336. Pierre added a comment. Deleted blank line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60763/new/ https://reviews.llvm.org/D60763 Files: clang/include/clang/Basic/CMakeLists.txt clang/include/clang/Basic/OpenCLBuiltins.td clang/lib/S

[PATCH] D60764: Add clang cc1 option to generate OpenCL builtin functions

2019-04-16 Thread Pierre via Phabricator via cfe-commits
Pierre created this revision. Pierre added reviewers: svenvh, Anastasia. Herald added subscribers: cfe-commits, kristina, yaxunl. Herald added a project: clang. Clang cc1 currently sets the -finclude-default-header flag by default, including the opencl-c.h header file. This patch adds a -fgenera

[PATCH] D60687: [clangd] Check file path of declaring header when deciding whether to insert include.

2019-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! IIUC, this already fixes the cases we'd seen of include-insertion of a header into itself. Is it feasible to add a test case for that? Comment at: clangd/Head

[PATCH] D60687: [clangd] Check file path of declaring header when deciding whether to insert include.

2019-04-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: unittests/clangd/HeadersTests.cpp:208 TEST_F(HeadersTest, DoNotInsertIfInSameFile) { MainFile = testPath("main.h"); > IIUC, this already fixes the cases we'd seen of include-

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

2019-04-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:251 + auto Res = + std::lower_bound(MainFileIncludes.begin(), MainFileIncludes.end(), Inc, + [](const Inclusion &LHS, const Inclusion &RHS) { NIT: use `llvm::lower_

[PATCH] D60687: [clangd] Check file path of declaring header when deciding whether to insert include.

2019-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: unittests/clangd/HeadersTests.cpp:208 TEST_F(HeadersTest, DoNotInsertIfInSameFile) { MainFile = testPath("main.h"); ioeric wrote: > > IIUC, this already fixes the cases we'd seen of include-insertion of a > > he

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:286 +help. + }]; +} keryell wrote: > aaron.ballman wrote: > > I'm still not entirely certain how I would know what to mark and how. From > > the description, it sounds like whoev

[PATCH] D60739: [analyzer] NFC: Re-use reusable unittest mocks.

2019-04-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. LGTM. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60739/new/ https://reviews.llvm.org/D60739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D60742: [analyzer] RegionStore: Enable loading default bindings from variables.

2019-04-16 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. I like the test even more than the change itself! Comment at: clang/unittests/StaticAnalyzer/StoreTest.cpp:49 +// Bind(Zero) +Store StX0 = +StMgr.Bind(StInit, LX0, Zero).getStore(); Th

[PATCH] D60697: [ARM] Allow "-march=foo+fp" to vary with foo.

2019-04-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 3 inline comments as done. simon_tatham added a comment. The aim of this change is that it will apply to the v8.1-M (mainline) architecture introduced in D60698 , in which `+fp` //won't// be the default: `-march=armv8.1m.main` by itself gives

Re: r358402 - clang-format vs plugin: Visual Studio 2019 support

2019-04-16 Thread Hans Wennborg via cfe-commits
Don't know, but taking a look at that is on today's todo list. On Mon, Apr 15, 2019 at 6:47 PM Nico Weber via cfe-commits wrote: > > Nice! Is adding compat to > https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain&ssr=false#overview > equally easy? > > On Mon, Apr 1

[PATCH] D60697: [ARM] Allow "-march=foo+fp" to vary with foo.

2019-04-16 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added inline comments. Comment at: llvm/lib/Support/ARMTargetParser.cpp:476 -StringRef ARM::getArchExtFeature(StringRef ArchExt) { - if (ArchExt.startswith("no")) { -StringRef ArchExtBase(ArchExt.substr(2)); -for (const auto AE : ARCHExtNames) { - if

[PATCH] D44352: [Concepts] Constrained template parameters

2019-04-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:3708 + if (Expr *CE = D->getConstraintExpression()) +R->setConstraintExpression(VisitExpr(CE)); + return R; martong wrote: > Please use the `import` function instead of `VisitExpr`. Calling

[PATCH] D58236: Make address space conversions a bit stricter.

2019-04-16 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In D58236#1467151 , @Anastasia wrote: > In D58236#1466263 , @ebevhan wrote: > > > Well, it doesn't seem to me like there is consensus on prohibiting nested > > address space conversion like

[PATCH] D60721: [ARM] Check codegen of v8.2a intrinsics

2019-04-16 Thread Diogo N. Sampaio via Phabricator via cfe-commits
dnsampaio abandoned this revision. dnsampaio added a comment. Moved tests to D60720 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60721/new/ https://reviews.llvm.org/D60721 ___ cfe-c

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the update, looks good! Just a few nits from my side. > The only part I don't love (here and elsewhere) is the duplicate overloads > one each for std::string and TextGenerator. Totally agree, that's not ideal. Would be nice to find a way to workaround t

[PATCH] D60543: [clang] Add matcher for subclasses of Objective-C interfaces 🔍

2019-04-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: jordan_rose, rjmccall. aaron.ballman added a comment. Adding some ObjC experts in case they'd like to weigh in on the name `isDerivedFrom` in this context. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:1479 +/// \endcode +AST_MATCHER_

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-16 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. In D60455#1467018 , @Anastasia wrote: > Just to understand how this will work. I would imagine you can have a device > function definition preceding its use. When the function is being parsed it's > not known yet whether it wil

r358483 - Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)

2019-04-16 Thread Hans Wennborg via cfe-commits
Author: hans Date: Tue Apr 16 05:13:25 2019 New Revision: 358483 URL: http://llvm.org/viewvc/llvm-project?rev=358483&view=rev Log: Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259) The original commit caused false positives fro

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp:130-131 "bugprone-throw-keyword-missing"); +CheckFactories.registerCheck( +"bugprone-too-small-loop-variable"); CheckFactories.registerCheck( --

[PATCH] D60749: [Test] Remove obsolete test.

2019-04-16 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, thank you! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60749/new/ https://reviews.llvm.org/D60749

[PATCH] D59459: [analyzer][NFC] Prefer binary searches in CheckerRegistry

2019-04-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 195358. Szelethus added a comment. Avoid past-the-end iterator dereference, add it to the assert. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59459/new/ https://reviews.llvm.org/D59459 Files: include/clang/StaticAnalyzer/Frontend/CheckerRegis

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D59802#1467430 , @hintonda wrote: > In D59802#1467363 , @aaron.ballman > wrote: > > > LGTM aside from a nit and the ultimate name for the `isa_and_nonnull<>` API. > > > Thanks. I'

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-16 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:286 +help. + }]; +} Anastasia wrote: > keryell wrote: > > aaron.ballman wrote: > > > I'm still not entirely certain how I would know what to mark and how. > > > From the descript

[PATCH] D59459: [analyzer][NFC] Prefer binary searches in CheckerRegistry

2019-04-16 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware accepted this revision. baloghadamsoftware added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59459/new/ https://reviews.llvm.org/D59459 ___ cfe-commits m

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-04-16 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro marked 3 inline comments as done. djtodoro added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:4537 + CGM.getLangOpts().Optimize) { +for (auto &SP : DeclCache) { + auto *D = SP.first; aprantl wrote: > Just looking at the type dec

[PATCH] D58035: [clang/DIVar] Emit flag for params that have unchanged values

2019-04-16 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro updated this revision to Diff 195359. djtodoro added a comment. -Run clang-format -Use `cast` instead of '`dyn_cast`' CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58035/new/ https://reviews.llvm.org/D58035 Files: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h Ind

[PATCH] D59923: [Driver] Simplify -g level computation and its interaction with -gsplit-dwarf

2019-04-16 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59923/new/ https://reviews.llvm.org/D59923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 195364. ymandel added a comment. Cleaned up header comments; added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60408/new/ https://reviews.llvm.org/D60408 Files: clang/include/clang/Tooling/Refactori

[PATCH] D55616: Emit ASM input in a constant context

2019-04-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. @void hi, this broke assembly code on NetBSD for various archs and blocks upgrade of the toolchain. Could you please have a look? https://bugs.llvm.org/show_bug.cgi?id=41027 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55616/new/ h

[PATCH] D60728: [clang] [test] Add a (xfailing) test for PR41027

2019-04-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a reviewer: void. krytarowski added a subscriber: void. krytarowski added a comment. Adding @void, regression introduced with D55616 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60728/new/ https://reviews.llvm.org/D60728

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-16 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/test/SemaSYCL/device-attributes-on-non-sycl.cpp:2 +// RUN: %clang_cc1 -fsyntax-only -fsycl-is-device -verify %s +// Now pretend that we're compiling a C++ file. There should be warnings. +// RUN: %clang_cc1 -fsyntax-only -verify

[PATCH] D60728: [clang] [test] Add a (xfailing) test for PR41027

2019-04-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. What's the value in checking in this xfail'ed test without an actual fix for the problem? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60728/new/ https://reviews.llvm.org/D60728 ___ cfe-commits mailing list cfe-commi

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 195365. ymandel marked 6 inline comments as done. ymandel added a comment. Cleaned up header comments; added tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60408/new/ https://reviews.llvm.org/D60408 File

[PATCH] D41910: [Concepts] Constrained partial specializations and function overloads.

2019-04-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:5096 +if (!ClassTemplate->findPartialSpecialization(TemplateArgs, +PartSpec->getAssociatedConstraints(), InsertPos)) // Add this partial specialization to the class template. --

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 5 inline comments as done. ymandel added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/Transformer.h:76 +// `ASTEdit` should be built using the corresponding builder class, +// `ASTEditBuilder`. For example, +// \code ilya-bi

[PATCH] D60719: Demonstrate how to fix freestanding for memcpy

2019-04-16 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 195369. gchatelet added a comment. Add test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60719/new/ https://reviews.llvm.org/D60719 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGen/freesta

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-16 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. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60408/new/ https://reviews.llvm.org/D60408

[PATCH] D60408: [LibTooling] Extend Transformer to support multiple simultaneous changes.

2019-04-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Not sure if you want to land this before or after stencil. This seems useful even without the latter. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60408/new/ https://reviews.llvm.org/D60408 __

r358490 - [AArch64] Implement Vector Funtion ABI name mangling.

2019-04-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Apr 16 06:56:21 2019 New Revision: 358490 URL: http://llvm.org/viewvc/llvm-project?rev=358490&view=rev Log: [AArch64] Implement Vector Funtion ABI name mangling. Summary: The name mangling scheme is defined in section 3.5 of the "Vector function application binary inter

[PATCH] D60583: [AArch64] Implement Vector Funtion ABI name mangling.

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358490: [AArch64] Implement Vector Funtion ABI name mangling. (authored by ABataev, committed by ). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to commit: https:

[PATCH] D59885: [Lex] Allow to consume tokens while preprocessing

2019-04-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Lex/Preprocessor.h:120 +/// callback that records tokens. +enum class TokenSource { + File, // a token coming directly from a file that is not a macro directive, This is supposed to provide eno

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-16 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added a comment. In D60455#1467279 , @aaron.ballman wrote: > > I'm still wondering what the actual semantics are for the attribute. Right > now, these are being parsed and ignored -- are there future plans here? Yes, we are going to teach

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

2019-04-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 195375. kadircet marked 14 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/Diagnos

[PATCH] D60775: [libclang] Expose ext_vector_type

2019-04-16 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. Expose `ext_vector_type` through the C API. Repository: rC Clang https://reviews.llvm.org/D60775 Files: bindings/python/clang/cindex.py includ

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

2019-04-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: unittests/clangd/DiagnosticsTests.cpp:620 +ParsedAST build(const std::string &MainFile, +const llvm::StringMap &Files) { ilya-biryukov wrote: > We were discussing adding the extra files to `TestTU` ins

[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

2019-04-16 Thread Don Hinton via Phabricator via cfe-commits
hintonda marked an inline comment as done. hintonda added inline comments. Comment at: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp:27-28 CheckFactories.registerCheck("llvm-include-order"); +CheckFactories.registerCheck( +"llvm-prefer-isa-or-dyn-cast-in-c

[PATCH] D60763: Prototype OpenCL BIFs using Tablegen

2019-04-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a subscriber: joey. Anastasia added a comment. Not related to this patch but it might be good to start thinking about testing this functionality properly. In the past we haven't tested the header because it would take a lot of testing time. So I would suggest we keep a light mini

r358493 - [OPENMP]Require aarch arch for the tests, NFC.

2019-04-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Apr 16 07:26:10 2019 New Revision: 358493 URL: http://llvm.org/viewvc/llvm-project?rev=358493&view=rev Log: [OPENMP]Require aarch arch for the tests, NFC. Modified: cfe/trunk/test/OpenMP/declare_simd_aarch64.c cfe/trunk/test/OpenMP/declare_simd_aarch64.cpp cf

[PATCH] D60764: Add clang cc1 option to generate OpenCL builtin functions

2019-04-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/include/clang/Driver/CC1Options.td:755 HelpText<"Include the default header file for OpenCL">; +def fgenerate_opencl_builtin: Flag<["-"], "fgenerate-opencl-builtin">, + HelpText<"Generate OpenCL builtin functions using Tableg

[clang-tools-extra] r358496 - [clangd] Check file path of declaring header when deciding whether to insert include.

2019-04-16 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Apr 16 07:35:49 2019 New Revision: 358496 URL: http://llvm.org/viewvc/llvm-project?rev=358496&view=rev Log: [clangd] Check file path of declaring header when deciding whether to insert include. Summary: Previously, we would use include spelling of the declaring header to

[PATCH] D60687: [clangd] Check file path of declaring header when deciding whether to insert include.

2019-04-16 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358496: [clangd] Check file path of declaring header when deciding whether to insert… (authored by ioeric, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-16 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas updated this revision to Diff 195382. ztamas added a comment. Update patch based on reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60507/new/ https://reviews.llvm.org/D60507 Files: clang-tools-extra/clang-tidy/bugprone/B

[PATCH] D60775: [libclang] Expose ext_vector_type

2019-04-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60775/new/ https://reviews.llvm.org/D60775 ___

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-16 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked 4 inline comments as done. ztamas added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unhandled-self-assignment.rst:6 + +`cert-oop54-cpp` redirects here as an alias for this check. + aaron.ballman wrote: > You shoul

[PATCH] D60776: [clang-tidy] Add test support for the fix description.

2019-04-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. Herald added a subscriber: xazax.hun. Herald added a project: clang. Add a new annotation "CHECK-FIX-DESCRIPTIONS" to lit test to verify the fix description provided by checks. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D60776: [clang-tidy] Add test support for the fix description.

2019-04-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 195385. hokein added a comment. cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60776/new/ https://reviews.llvm.org/D60776 Files: clang-tools-extra/test/clang-tidy/check_clang_tidy.py clang-tools-extr

[PATCH] D59887: [Syntax] Introduce TokenBuffer, start clangToolingSyntax library

2019-04-16 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/Tooling/Syntax/TokenBuffer.h:146 + llvm::Optional> + toOffsetRange(const Token *Begin, const Token *End, +const SourceManager &SM) const; ilya-biryukov wrote: > ilya-biryukov wrote

[PATCH] D60507: [clang-tidy] new check: bugprone-unhandled-self-assignment

2019-04-16 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas marked 2 inline comments as done. ztamas added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-unhandled-self-assignment.cpp:351 + int *p; +}; aaron.ballman wrote: > ztamas wrote: > > JonasToth wrote: > > > Please add tests with t

[PATCH] D60728: [clang] [test] Add a (xfailing) test for PR41027

2019-04-16 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In D60728#1468486 , @hans wrote: > What's the value in checking in this xfail'ed test without an actual fix for > the problem? Raise awareness about the problem. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60728/

r358503 - [OPENMP][NVPTX]Run combined constructs with if clause in SPMD mode.

2019-04-16 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Apr 16 08:39:12 2019 New Revision: 358503 URL: http://llvm.org/viewvc/llvm-project?rev=358503&view=rev Log: [OPENMP][NVPTX]Run combined constructs with if clause in SPMD mode. Combined constructs with parallel and if clauses without modifiers may be executed in SPMD mode

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-16 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D60455#1468386 , @Fznamznon wrote: > > Ok, my question is whether you are planning to duplicate the same logic as > > for OpenCL kernel which doesn't really seem like an ideal design choice. Is > > this the only difference then

[PATCH] D58033: Add option for emitting dbg info for call sites

2019-04-16 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. I guess I'm not clear what your final goal is for the option. Keep it, even though GCC doesn't have one like it? Eliminate it? Please clearly state what you intend to have in the end, and what you might have in the short term in case that is different. =

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 195394. gtbercea added a comment. - Fix checks for use of requires directive. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60568/new/ https://reviews.llvm.org/D60568 Files: lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/C

[PATCH] D60778: Make precompiled headers reproducible by switching OpenCL extension to std::map

2019-04-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: lebedev.ri, sylvestre.ledru, riccibruno. Herald added subscribers: ebevhan, JDevlieghere, yaxunl. As discussed in https://reviews.llvm.org/D60379 let's use std::map to store OpenCL extensions data structure. Not sure how to test this th

[PATCH] D60379: Make precompiled headers reproducible

2019-04-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. FYI, I switched to `std::map` in this review: https://reviews.llvm.org/D60778 @sylvestre.ledru do you think it's possible to apply this patch and see if it work for your bug? Btw I am still confused about the reproducibility - does clang produce the same PCH at leas

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + Why do you need this? I think your function should be called without

[PATCH] D60455: [SYCL] Add support for SYCL device attributes

2019-04-16 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D60455#1467279 , @aaron.ballman wrote: > In D60455#1464324 , @Fznamznon wrote: > > > Applied comments from @aaron.ballman and @keryell > > > > - Introduced a C++11 and C2x style spelling i

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + ABataev wrote: > Why do y

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + gtbercea wrote: > ABataev wrote: > > Why do you need this? I think yo

[PATCH] D60778: Make precompiled headers reproducible by switching OpenCL extension to std::map

2019-04-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. > Not sure how to test this though? I guess we can trust that std::map is > always sorted just as it says in its description. You could add a test that contains several entries in `OpenCLTypeExtMap` and several entries in `OpenCLDeclExtMap`. In that test, write te PC

r358507 - [Test] Remove obsolete test.

2019-04-16 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Tue Apr 16 09:44:45 2019 New Revision: 358507 URL: http://llvm.org/viewvc/llvm-project?rev=358507&view=rev Log: [Test] Remove obsolete test. The FIXME of this test case has been addressed in r335084/r338800. Its execution still does not succeed because of multiple syntax

[PATCH] D60749: [Test] Remove obsolete test.

2019-04-16 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358507: [Test] Remove obsolete test. (authored by Meinersbur, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60749/new/ https://reviews.llvm.org/D60749 Fil

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2019-04-16 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx updated this revision to Diff 195408. m4tx added a comment. Herald added a project: clang. Updated the diff for the latest (master) version, used GitHub monorepo for the changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55793/new/ https:/

[PATCH] D60735: [FileSystemStatCache] Return std::error_code from stat cache methods

2019-04-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM, please mark it as NFC Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60735/new/ https://reviews.llvm.org/D60735

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2019-04-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-redundant-access-specifiers.rst:34 + If set to non-zero, the check will also give warning if the first access + specifier declaration is redundant (e.g. `private` inside `c

[PATCH] D60728: [clang] [test] Add a (xfailing) test for PR41027

2019-04-16 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. In D60728#1468486 , @hans wrote: > What's the value in checking in this xfail'ed test without an actual fix for > the problem? 1. It may help whoever tries to address it in the future, to have a known-good reproducer. 2. If so

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2019-04-16 Thread Mateusz Maćkowski via Phabricator via cfe-commits
m4tx updated this revision to Diff 195409. m4tx added a comment. Updated the backticks in the documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55793/new/ https://reviews.llvm.org/D55793 Files: clang-tools-extra/clang-tidy/readability

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + ABataev wrote: > gtbercea

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea marked an inline comment as done. gtbercea added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + gtbercea wrote: > ABataev

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-04-16 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev marked 10 inline comments as done. anton-afanasyev added a comment. Patch by @thakis for BE passes tracing: https://reviews.llvm.org/D60782 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58675/new/ https://reviews.llvm.org/D58675

r358509 - [FileSystemStatCache] Return std::error_code from stat cache methods

2019-04-16 Thread Harlan Haskins via cfe-commits
Author: harlanhaskins Date: Tue Apr 16 10:34:26 2019 New Revision: 358509 URL: http://llvm.org/viewvc/llvm-project?rev=358509&view=rev Log: [FileSystemStatCache] Return std::error_code from stat cache methods Summary: Previously, we would return true/false signifying if the cache/lookup succeeded

[PATCH] D60735: [FileSystemStatCache] Return std::error_code from stat cache methods

2019-04-16 Thread Harlan Haskins via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358509: [FileSystemStatCache] Return std::error_code from stat cache methods (authored by harlanhaskins, committed by ). Changed prior to commit: https://reviews.llvm.org/D60735?vs=195264&id=195411#toc

[PATCH] D60786: [FileSystemStatCache] Update test for new FileSystemStatCache API

2019-04-16 Thread Harlan Haskins via Phabricator via cfe-commits
harlanhaskins created this revision. harlanhaskins added a reviewer: arphaman. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Herald added a subscriber: orm

[PATCH] D60786: [FileSystemStatCache] Update test for new FileSystemStatCache API

2019-04-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Herald added a subscriber: ormris. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60786/new/ https://reviews.llvm.org/D60786 __

r358511 - [FileSystemStatCache] Update test for new FileSystemStatCache API

2019-04-16 Thread Harlan Haskins via cfe-commits
Author: harlanhaskins Date: Tue Apr 16 11:00:43 2019 New Revision: 358511 URL: http://llvm.org/viewvc/llvm-project?rev=358511&view=rev Log: [FileSystemStatCache] Update test for new FileSystemStatCache API Summary: Update this test to return std::error_code instead of LookupResult. Reviewers: ar

[PATCH] D60786: [FileSystemStatCache] Update test for new FileSystemStatCache API

2019-04-16 Thread Harlan Haskins via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358511: [FileSystemStatCache] Update test for new FileSystemStatCache API (authored by harlanhaskins, committed by ). Changed prior to commit: https://reviews.llvm.org/D60786?vs=195416&id=195417#toc Re

[PATCH] D60568: [OpenMP] Add support for registering requires directives with the runtime

2019-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:644 + /// Flag for keeping track of weather a target region has been emitted. + bool hasEmittedTargetRegion = false; + gtbercea wrote: > gtbercea wrote: > > ABataev wrote: > > > gtbercea w

[PATCH] D60539: Add -std=c++14 language standard option to tests that require C++14 default

2019-04-16 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. > Do you need to build clangd? We explicitly don't aim to support building > everywhere clang can be built, maybe we should just disable in this case? Our environment includes various OS levels running on PowerPC. We certainly wouldn't want to disable building/testing

  1   2   >