[PATCH] D39903: [libclang] Allow pretty printing declarations

2017-12-08 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D39903#944182, @cameron314 wrote: > Locally we've done something similar (adding a > `clang_getCursorPrettyPrintedDeclaration` function, though without exposing > the `PrintingPolicy`) and overhauled `DeclPrinter` to produce proper pretty >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2017-12-08 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:59 + if (!BeginLoc.isMacroID()) { +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s");

[PATCH] D38425: [clangd] Document highlights for clangd

2017-12-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Overall looks good, just a few minor comments. Let me know if need someone to land this patch for you after you fix those. Comment at: clangd/ClangdUnit.cpp:249 +// Don't keep the same Macro info multiple times. +// This can happen when

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. More comments, but only two major things really: - I'd like to clearly separate USR from SymbolID (even if you want to keep using USRs as their basis for now) - the file organization (code within files, and names of files) needs some work I think Everything else is

[PATCH] D40561: [libclang] Fix cursors for functions with trailing return type

2017-12-08 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping https://reviews.llvm.org/D40561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40481: [libclang] Fix cursors for arguments of Subscript and Call operators

2017-12-08 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping https://reviews.llvm.org/D40481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41001: [change-namespace] Fix crash when injected base-class name is used in friend declarations.

2017-12-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41001 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover updated this revision to Diff 126129. t.p.northover added a comment. Updating with tentative fixes to review comments. Repository: rC Clang https://reviews.llvm.org/D40948 Files: clang/lib/Frontend/CompilerInvocation.cpp clang/test/CodeGenCXX/new-overflow.cpp

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added inline comments. Comment at: clang/test/CodeGenCXX/new-overflow.cpp:88 // CHECK: [[N:%.*]] = sext i16 {{%.*}} to i32 - // CHECK-NEXT: [[T0:%.*]] = icmp slt i32 [[N]], 0 - // CHECK-NEXT: [[T1:%.*]] = select i1 [[T0]], i32 -1, i32 [[N]] - //

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2017-12-08 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik created this revision. When a preamble is created an unsaved file not existing on disk is already part of PrecompiledPreamble::FilesInPreamble. However, when checking whether the preamble can be re-used, a failed stat of such an unsaved file invalidated the preamble, which led to pointless

[PATCH] D40952: [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 126116. sammccall added a comment. Add documentation to matcher implementation. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40952 Files: test/clangd/completion-items-kinds.test test/clangd/completion-priorities.test

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the feedback, Marc! Yeah, I think the ClangdIndexDataSymbol and ClangdIndexDataOccurrence are something similar to what https://reviews.llvm.org/D40897 trying to address, maybe put the discussion there? Before that, I think having a sym meeting is a good

[PATCH] D41001: [change-namespace] Fix crash when injected base-class name is used in friend declarations.

2017-12-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40952: [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. lg Comment at: unittests/clangd/Matchers.h:54 + bool MatchAndExplain(const std::vector , + ::testing::MatchResultListener *L) const { +std::vector Matches(Matchers.size());

[PATCH] D40489: [clangd] Changed tracing interfaces

2017-12-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Trace.cpp:138 return; - if (!Args) -Args = llvm::make_unique(); - T->event(Ctx, "E", - Args ? json::obj{{"args", std::move(*Args)}} : json::obj{}); + assert(Args && "Args can't be null at this point");

r320135 - In stdbool.h, define bool, false, true only in gnu++98

2017-12-08 Thread Stephan Bergmann via cfe-commits
Author: sberg Date: Fri Dec 8 00:28:08 2017 New Revision: 320135 URL: http://llvm.org/viewvc/llvm-project?rev=320135=rev Log: In stdbool.h, define bool, false, true only in gnu++98 GCC has meanwhile corrected that with the similar "C++11

[PATCH] D40167: In stdbool.h, define bool, false, true only in gnu++98

2017-12-08 Thread Stephan Bergmann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320135: In stdbool.h, define bool, false, true only in gnu++98 (authored by sberg). Changed prior to commit: https://reviews.llvm.org/D40167?vs=123296=126095#toc Repository: rC Clang

[PATCH] D41001: [change-namespace] Fix crash when injected base-class name is used in friend declarations.

2017-12-08 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320139: [change-namespace] Fix crash when injected base-class name is used in friend… (authored by ioeric). Repository: rL LLVM https://reviews.llvm.org/D41001 Files:

[clang-tools-extra] r320139 - [change-namespace] Fix crash when injected base-class name is used in friend declarations.

2017-12-08 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Dec 8 02:06:16 2017 New Revision: 320139 URL: http://llvm.org/viewvc/llvm-project?rev=320139=rev Log: [change-namespace] Fix crash when injected base-class name is used in friend declarations. Reviewers: hokein Subscribers: klimek, cfe-commits Differential Revision:

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the useful comments! Comment at: clangd/Symbol.h:1 +//===--- Symbol.h ---*- C++-*-===// +// sammccall wrote: > sammccall wrote: > > I think that: > > - there's other places in

[PATCH] D38639: [clangd] #include statements support for Open definition

2017-12-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:38 +class DelegatingPPCallbacks : public PPCallbacks { + Nebiroth wrote: > ilya-biryukov wrote: > > What's the purpose of this class? > We need to be able to use a wrapper class to be able

[PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D40548#949182, @malaperle wrote: > As a follow-up, here's the interface for querying the index that I am using > right now. It's meant to be able to retrieve from any kind of "backend", i.e. > in-memory, ClangdIndexDataStore, libIndexStore,

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 126115. hokein marked 4 inline comments as done. hokein added a comment. Address review comments. - Use SymbolSlab, for allowing future space optimization. - Fix a Cast issue when building debug unittest. Repository: rCTE Clang Tools Extra

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-08 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Format/Format.h:1375 +std::vector EnclosingFunctionNames; +/// \brief The canonical delimiter for this language. +std::string CanonicalDelimiter; djasper wrote: > krasimir wrote: > > djasper

[PATCH] D40952: [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-08 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 Comment at: unittests/clangd/CodeCompleteTests.cpp:289 +}; +void Foo::pub() { this->^ } + )cpp"); The `^` symbol conflicts with

[PATCH] D40712: Add cc1 flag enabling the function stack size section that was added in r319430

2017-12-08 Thread Sean Eveson via Phabricator via cfe-commits
seaneveson added a comment. Ping. https://reviews.llvm.org/D40712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40489: [clangd] Changed tracing interfaces

2017-12-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Trace.cpp:138 return; - if (!Args) -Args = llvm::make_unique(); - T->event(Ctx, "E", - Args ? json::obj{{"args", std::move(*Args)}} : json::obj{}); + assert(Args && "Args can't be null at this point"); +

[PATCH] D40909: [clang-format] Reorganize raw string delimiters

2017-12-08 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: include/clang/Format/Format.h:1375 +std::vector EnclosingFunctionNames; +/// \brief The canonical delimiter for this language. +std::string CanonicalDelimiter; krasimir wrote: > djasper wrote: > > Can you

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Frontend/PrecompiledPreamble.cpp:242 std::shared_ptr PCHContainerOps, bool StoreInMemory, -PreambleCallbacks ) { +PreambleCallbacks , std::unique_ptr PPCallbacks) { assert(VFS && "VFS is null");

[PATCH] D40952: [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 126114. sammccall marked an inline comment as done. sammccall added a comment. Reformat around code-complete testcases Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40952 Files: test/clangd/completion-items-kinds.test

[PATCH] D39375: [clang] Add PPCallbacks list to preprocessor when building a preacompiled preamble.

2017-12-08 Thread William Enright via Phabricator via cfe-commits
Nebiroth added inline comments. Comment at: lib/Frontend/PrecompiledPreamble.cpp:242 std::shared_ptr PCHContainerOps, bool StoreInMemory, -PreambleCallbacks ) { +PreambleCallbacks , std::unique_ptr PPCallbacks) { assert(VFS && "VFS is null");

[PATCH] D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.

2017-12-08 Thread Paweł Bylica via Phabricator via cfe-commits
chfast added inline comments. Comment at: cfe/trunk/docs/ClangFormatStyleOptions.rst:173 + + someLongFunction(argument1, + argument2); I think this example is not achievable. clang-format seems to prefer putting all arguments on the next line if

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2017-12-08 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed. This looks useful. Could we avoid creating the `OverlayFileSystem`, though? Comment at: include/clang/Frontend/PrecompiledPreamble.h:109 +

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 126156. hokein marked 6 inline comments as done. hokein added a comment. - reorganize files, move to index subdirectory. - change symbol ID to a hash value, instead of couple with USR. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40897

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Reorganizing the source files made all the comments invalid in the latest version :(. Feel free to comment on the old version or the new version. Comment at: clangd/Symbol.h:23 + // The path of the source file where a symbol occurs. + std::string

Re: [PATCH] D40548: [clangd] Symbol index interfaces and index-based code completion.

2017-12-08 Thread Marc-André Laperle via cfe-commits
A Hangouts meeting sounds good! Yes, let's arrange via emails. From: Haojian Wu via Phabricator Sent: Friday, December 8, 2017 7:14:42 AM To: ioe...@google.com; Marc-André Laperle; sammcc...@google.com Cc: hok...@google.com;

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2017-12-08 Thread Cameron via Phabricator via cfe-commits
cameron314 added a comment. It's been a while since I was in this code, but I seem to recall the file needed to exist on disk in order to uniquely identify it (via inode). Does this break the up-to-date check? Repository: rC Clang https://reviews.llvm.org/D41005

Re: r305110 - [ODRHash] Add support for TemplateArgument types.

2017-12-08 Thread Vassil Vassilev via cfe-commits
Hi Richard,   Is there a way to get an ODRHashing which is stable across translation units? I'd like to use the TemplateArgument ODRHash to lookup template specializations and deserialize them only if they are required. Many thanks! Vassil On 6/9/17 11:00 PM, Richard Trieu via cfe-commits

[PATCH] D40685: [libunwind] Switch to add_llvm_install_targets

2017-12-08 Thread Will Dietz via Phabricator via cfe-commits
dtzWill added a comment. Hmm, this change means very recent LLVM is required to build libunwind-- previously I was able to use recent libunwind/libcxx/libcxxabi with LLVM 5 and LLVM 4. Other runtime projects (compiler-rt, libcxx, libcxxabi) were modified to support the new "strip-and-install"

[PATCH] D40372: [ExprConstant] Fix assert when initializing constexpr array

2017-12-08 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Ping! https://reviews.llvm.org/D40372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40952: [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-08 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320148: [clangd] Convert lit code completion tests to unit-tests. NFC (authored by sammccall). Repository: rL LLVM https://reviews.llvm.org/D40952 Files:

[clang-tools-extra] r320148 - [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-08 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Dec 8 07:00:59 2017 New Revision: 320148 URL: http://llvm.org/viewvc/llvm-project?rev=320148=rev Log: [clangd] Convert lit code completion tests to unit-tests. NFC Summary: This improves readability of tests and error messages. Reviewers: ioeric Subscribers:

[PATCH] D40952: [clangd] Convert lit code completion tests to unit-tests. NFC

2017-12-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:289 +}; +void Foo::pub() { this->^ } + )cpp"); ilya-biryukov wrote: > The `^` symbol conflicts with the corresponding

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1733 // The PS4 uses C++11 as the default C++ standard. - if (T.isPS4()) -LangStd = LangStandard::lang_gnucxx11; - else -LangStd = LangStandard::lang_gnucxx98; +

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. (From https://reviews.llvm.org/D40548) Here's the interface for querying the index that I am using right now. It's meant to be able to retrieve from any kind of "backend", i.e. in-memory, ClangdIndexDataStore, libIndexStore, etc. I was able to implement "Open

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1733 // The PS4 uses C++11 as the default C++ standard. - if (T.isPS4()) -LangStd = LangStandard::lang_gnucxx11; - else -LangStd =

[PATCH] D41012: [OpenMP] Further adjustments of nvptx runtime functions

2017-12-08 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. Herald added subscribers: cfe-commits, jholewinski. Pass in default value of 1, similar to previous commit https://reviews.llvm.org/rL318836. Repository: rC Clang https://reviews.llvm.org/D41012 Files: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp

r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Hans Wennborg via cfe-commits
Author: hans Date: Fri Dec 8 08:54:08 2017 New Revision: 320162 URL: http://llvm.org/viewvc/llvm-project?rev=320162=rev Log: Revert "Unify implementation of our two different flavours of -Wtautological-compare." > Unify implementation of our two different flavours of -Wtautological-compare. >

[PATCH] D40685: [libunwind] Switch to add_llvm_install_targets

2017-12-08 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. The other runtime projects had the stripped installation targets added manually because they officially support being built completely standalone (i.e. without any LLVM components), so we can't rely on LLVM's CMake there. That's really unfortunate IMO, since it leads

[PATCH] D40625: Harmonizing attribute GNU/C++ spellings

2017-12-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: include/clang/Basic/Attr.td:602 def AnalyzerNoReturn : InheritableAttr { - let Spellings = [GNU<"analyzer_noreturn">]; + let Spellings = [Clang<"analyzer_noreturn">]; let Documentation = [Undocumented];

Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Richard Smith via cfe-commits
On 8 Dec 2017 08:54, "Hans Wennborg via cfe-commits" < cfe-commits@lists.llvm.org> wrote: Author: hans Date: Fri Dec 8 08:54:08 2017 New Revision: 320162 URL: http://llvm.org/viewvc/llvm-project?rev=320162=rev Log: Revert "Unify implementation of our two different flavours of

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1733 // The PS4 uses C++11 as the default C++ standard. - if (T.isPS4()) -LangStd = LangStandard::lang_gnucxx11; - else -LangStd = LangStandard::lang_gnucxx98; +

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-08 Thread Anton via Phabricator via cfe-commits
xgsa added a comment. In https://reviews.llvm.org/D40671#949687, @alexfh wrote: > How are unknown check names handled? More specifically: will the `// > NOLINT(runtime/explicit)` comment disable all clang-tidy checks or none? None. If comment is syntactically correct and contains parenthesis,

r320168 - [hwasan] typo in docs

2017-12-08 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Fri Dec 8 10:14:03 2017 New Revision: 320168 URL: http://llvm.org/viewvc/llvm-project?rev=320168=rev Log: [hwasan] typo in docs Modified: cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst Modified: cfe/trunk/docs/HardwareAssistedAddressSanitizerDesign.rst URL:

[PATCH] D40671: [clang-tidy] Support specific checks for NOLINT directive

2017-12-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D40671#945158, @xgsa wrote: > In https://reviews.llvm.org/D40671#944906, @alexfh wrote: > > > BTW, how will this feature interact with cpplint.py's way of handling > > specific NOLINT directives that use different lint rule names, which > >

[PATCH] D39363: [clang-tidy] Correctly classify constant arrays and constant strings as constants when checking identifiers naming

2017-12-08 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good! Thank you for the fix! Do you need someone to commit it for you? If yes, please rebase the fix on top of the current HEAD and let me know. Repository: rCTE Clang Tools Extra

[PATCH] D39363: [clang-tidy] Correctly classify constant arrays and constant strings as constants when checking identifiers naming

2017-12-08 Thread Beren Minor via Phabricator via cfe-commits
berenm updated this revision to Diff 126177. berenm added a comment. Rebase patch on upstream HEAD Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39363 Files: clang-tidy/readability/IdentifierNamingCheck.cpp test/clang-tidy/readability-identifier-naming.cpp Index:

[PATCH] D41012: [OpenMP] Further adjustments of nvptx runtime functions

2017-12-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D41012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12671 +void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, +const DeclarationNameInfo *Id) { if (!D || D->isInvalidDecl()) You can get

[libunwind] r320163 - [libunwind] Create install-unwind-stripped target manually

2017-12-08 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Fri Dec 8 09:15:05 2017 New Revision: 320163 URL: http://llvm.org/viewvc/llvm-project?rev=320163=rev Log: [libunwind] Create install-unwind-stripped target manually This supports using a newer libunwind with an older installation of LLVM (whose cmake modules wouldn't have

[PATCH] D39363: [clang-tidy] Correctly classify constant arrays and constant strings as constants when checking identifiers naming

2017-12-08 Thread Beren Minor via Phabricator via cfe-commits
berenm added a comment. Yes, please could you commit it for me? Thanks! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r320124 - Fold together the in-range and out-of-range portions of -Wtautological-compare.

2017-12-08 Thread Hans Wennborg via cfe-commits
Sorry, it seems it was r320124 that caused this; I shouldn't be sheriffing after-hours. I've reverted that one in r320162. On Thu, Dec 7, 2017 at 9:20 PM, Hans Wennborg wrote: > I've reverted in r320133 since it caused new warnings in Chromium that > I'm not sure were

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-08 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons created this revision. Herald added a subscriber: cfe-commits. Clang was crashing when diagnosing an unused-lambda-capture for a VLA because From.getVariable() is null for the capture of a VLA bound. Warning about the VLA bound capture is not helpful, so only warn for the VLA

r320165 - Fix a comment in the code

2017-12-08 Thread Kamil Rytarowski via cfe-commits
Author: kamil Date: Fri Dec 8 09:38:25 2017 New Revision: 320165 URL: http://llvm.org/viewvc/llvm-project?rev=320165=rev Log: Fix a comment in the code The -ldl library is missing on NetBSD too, make the comment more generic. Modified: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp

[PATCH] D40996: Add --no-cuda-version-check in unknown-std.cpp

2017-12-08 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Ideally the tests should be hermetic and should use mock CUDA installation that comes with the tests. E.g. `--cuda-path=%S/Inputs/CUDA/usr/local/cuda` https://reviews.llvm.org/D40996 ___ cfe-commits mailing list

Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Hans Wennborg via cfe-commits
On Fri, Dec 8, 2017 at 11:10 AM, Hans Wennborg wrote: > On Fri, Dec 8, 2017 at 9:30 AM, Richard Smith via cfe-commits > wrote: >> On 8 Dec 2017 08:54, "Hans Wennborg via cfe-commits" >> wrote: >> >> Author: hans >> Date:

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12671 +void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, +const DeclarationNameInfo *Id) { if (!D || D->isInvalidDecl()) ABataev wrote: >

[PATCH] D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs

2017-12-08 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. For the rest, LGTM. It fixes the segfault, for both the full original test case, and my reduced version. Comment at: lib/Sema/SemaLambda.cpp:1491 else diag <<

[PATCH] D40941: [ubsan] Use pass_object_size info in bounds checks (compiler-rt)

2017-12-08 Thread Vedant Kumar via Phabricator via cfe-commits
vsk closed this revision. vsk added a comment. Landed in r320129. https://reviews.llvm.org/D40941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Hans Wennborg via cfe-commits
On Fri, Dec 8, 2017 at 9:30 AM, Richard Smith via cfe-commits wrote: > On 8 Dec 2017 08:54, "Hans Wennborg via cfe-commits" > wrote: > > Author: hans > Date: Fri Dec 8 08:54:08 2017 > New Revision: 320162 > > URL:

[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

2017-12-08 Thread Vedant Kumar via Phabricator via cfe-commits
vsk closed this revision. vsk added a comment. Landed in r320128. https://reviews.llvm.org/D40940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40685: [libunwind] Switch to add_llvm_install_targets

2017-12-08 Thread Will Dietz via Phabricator via cfe-commits
dtzWill added a comment. Okay, that makes sense. Thanks for accommodating my use-case anyway! :D. Repository: rL LLVM https://reviews.llvm.org/D40685 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

2017-12-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > It's interesting to me that these array-bound checks don't seem to use > @llvm.objectsize in some form already. That would be a cool experiment. That said, one of the upsides of the current ubsan is that whether it will produce a diagnostic is predictable (as long

r320185 - [ubsan] array-bounds: Ignore params with constant size

2017-12-08 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Dec 8 11:51:42 2017 New Revision: 320185 URL: http://llvm.org/viewvc/llvm-project?rev=320185=rev Log: [ubsan] array-bounds: Ignore params with constant size This is a follow-up to r320128. Eli pointed out that there is some gray area in the language standard about

[PATCH] D40940: [ubsan] Use pass_object_size info in bounds checks

2017-12-08 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. I backed out the part of this patch which deals with array parameters declared like p[10] or p[static 10]: r320185. Comment at: lib/CodeGen/CGExpr.cpp:833 + // Arrays don't have pass_object_size attributes, but if they have a constant + // size modifier

[PATCH] D40712: Add cc1 flag enabling the function stack size section that was added in r319430

2017-12-08 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a comment. Looks good to me, but I'm not too familiar with the clang driver code. So it would be good if you could at least add some more experienced clang developers into the reviewer list and wait some more days before committing. I also wonder whether it would be possible to

[PATCH] D40948: Switch Clang's default C++ language target to C++14

2017-12-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM with the PS4 comment removed. Thank you! Please also update the documentation and the release notes. Comment at:

Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Bill Seurer via cfe-commits
It also caused all the sanitizer builds to fail. For example: http://lab.llvm.org:8011/builders/sanitizer-ppc64le-linux/builds/3654 /home/buildbots/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm/utils/TableGen/X86RecognizableInstr.cpp:789:21: error: comparison of constant -1 with expression

Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Richard Smith via cfe-commits
I'm going to reland without the changes to bit-field handling. If we want those changes (which I think we do, based on the bugs it found in selfhost), that'll need to be done more carefully, and I don't want to get the refactoring and bugfixes here tangled up with that. On 8 December 2017 at

Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Hans Wennborg via cfe-commits
For what it's worth, Chromium's bitfield warning is easy to fix. The "-1 vs enum" comparisons are more plentiful and less straightforward. I'm guessing it's the same for the self-host. On Fri, Dec 8, 2017 at 1:33 PM, Richard Smith via cfe-commits wrote: > I'm going to

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 marked an inline comment as done. kkwli0 added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:12671 +void Sema::checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, +const DeclarationNameInfo *Id) { if (!D ||

[libcxx] r320201 - [libc++] Unbreak Apple buildbots

2017-12-08 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Fri Dec 8 13:50:32 2017 New Revision: 320201 URL: http://llvm.org/viewvc/llvm-project?rev=320201=rev Log: [libc++] Unbreak Apple buildbots These buildbots are using the deprecated target name install-libcxx-headers instead of the more up to date install-cxx-headers, so I

[PATCH] D41031: [clangd] (Attempt to) read clang-format file for document formatting

2017-12-08 Thread Raoul Wols via Phabricator via cfe-commits
rwols created this revision. Takes into account the clang-format file of the project, if any. Reverts to LLVM if nothing is found. Replies with an error if any error occured. For instance, a parse error in the clang-format YAML file. https://reviews.llvm.org/D41031 Files:

Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."

2017-12-08 Thread Richard Smith via cfe-commits
For now, I've undone the change that caused us to warn (ever!) on comparisons between two expressions of enumeration type, and also the change to use more precise bit-width information for bit-field comparisons, and re-committed as r320211. The bugs exposed by self-host have been fixed in r320212

[PATCH] D41042: [analyzer] StackAddrEscape: Delay turning on by default a little bit?

2017-12-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. Herald added subscribers: cfe-commits, a.sidorin, szepet, xazax.hun. I'm seeing false positives on the new check added in https://reviews.llvm.org/D39438 of the following kind: void foo() { T buf[16]; for ( int n = 0; n < 16; ++n) { T *ptr = [n];

[PATCH] D41044: Implementation of -fextend-lifetimes and -fextend-this-ptr to aid with debugging of optimized code

2017-12-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. This might be something we want to turn on automatically for -Og. https://reviews.llvm.org/D41044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40995: [TextDiagnosticBuffer] Fix diagnostic note emission order.

2017-12-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Huh, I'm amazed we've had this bug for so long. Thanks! https://reviews.llvm.org/D40995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41042: [analyzer] StackAddrEscape: Delay turning on by default a little bit?

2017-12-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 126247. NoQ added a comment. Update the other run-line. https://reviews.llvm.org/D41042 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp test/Analysis/stack-capture-leak-arc.mm

[PATCH] D41044: Implementation of -fextend-lifetimes and -fextend-this-ptr to aid with debugging of optimized code

2017-12-08 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp created this revision. Herald added a subscriber: JDevlieghere. The patch implements the clang support for generating artificial uses of local variables and parameters to aid with debugging of optimized code. I presented this concept in my lightning talk "Debugging of optimized code:

r320239 - Revert r320230 to fix buildbots.

2017-12-08 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Dec 8 19:02:21 2017 New Revision: 320239 URL: http://llvm.org/viewvc/llvm-project?rev=320239=rev Log: Revert r320230 to fix buildbots. Modified: cfe/trunk/include/clang/AST/Decl.h cfe/trunk/include/clang/AST/ODRHash.h

[PATCH] D40995: [TextDiagnosticBuffer] Fix diagnostic note emission order.

2017-12-08 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Hi Richard. Thanks for accepting. I don't have commit privileges. Would you please commit for me? https://reviews.llvm.org/D40995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41042: [analyzer] StackAddrEscape: Delay turning on by default a little bit?

2017-12-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap accepted this revision. alexshap added a comment. This revision is now accepted and ready to land. i see, to be honest, this is kind of unfortunate, if i am not mistaken, i've seen these false-positives, but not too many, most reports were real bugs. But if it's annoying, than i think

[PATCH] D41036: IRGen: When performing CFI checks, load vtable pointer from vbase when necessary.

2017-12-08 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. Under the Microsoft ABI, it is possible for an object not to have a virtual table pointer of its own if all of its virtual functions were introduced by virtual bases. In that case, we need to load the vtable pointer from one of the virtual bases and perform the type

[PATCH] D40968: [OpenMP] Diagnose function name on the link clause

2017-12-08 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 updated this revision to Diff 126217. kkwli0 marked an inline comment as done. https://reviews.llvm.org/D40968 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaOpenMP.cpp test/OpenMP/declare_target_ast_print.cpp

r320212 - Remove creation of out-of-bounds value of enumeration type (resulting in UB).

2017-12-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Dec 8 15:29:59 2017 New Revision: 320212 URL: http://llvm.org/viewvc/llvm-project?rev=320212=rev Log: Remove creation of out-of-bounds value of enumeration type (resulting in UB). Also remove unnecessary initialization of out-parameters with this value, so that MSan is

[PATCH] D40897: [clangd] Introduce a "Symbol" class.

2017-12-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/Symbol.h:37 +// The class presents a C++ symbol, e.g. class, function. +struct Symbol { + // The symbol identifier, using USR. malaperle wrote: > sammccall wrote: > > hokein wrote: > > > malaperle wrote: > > >

[PATCH] D40998: [driver][darwin] Take the OS version specified in "-target" as the target OS instead of inferring it from SDK / environment

2017-12-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 126243. arphaman added a comment. I rewrote the patch on top of https://reviews.llvm.org/D41035 as suggested by Duncan. I also changed some of the semantics: - If `-target` is used with `Darwin` OS, then the OS will be determined using the old semantics.

[PATCH] D41035: [driver][darwin] Refactor the target selection code, NFC

2017-12-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch refactors the target selection in Darwin's driver. Firstly, the simulator variant of Darwin's platforms is removed in favor of a new environment field. Secondly, the code that selects the platform and the version is split into 4 different functions

[PATCH] D41035: [driver][darwin] Refactor the target selection code, NFC

2017-12-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 126222. arphaman marked an inline comment as done. arphaman added a comment. Add static_assert Repository: rC Clang https://reviews.llvm.org/D41035 Files: lib/Driver/ToolChains/Darwin.cpp lib/Driver/ToolChains/Darwin.h

r320233 - Fix fsanitize-blacklist test on Windows.

2017-12-08 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Dec 8 18:15:42 2017 New Revision: 320233 URL: http://llvm.org/viewvc/llvm-project?rev=320233=rev Log: Fix fsanitize-blacklist test on Windows. Broken in r320232. Modified: cfe/trunk/test/Driver/fsanitize-blacklist.c Modified:

  1   2   >