Re: r352690 - [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls

2019-01-31 Thread Eric Christopher via cfe-commits
Looks like this broke optimized asan builds via an assert in SCCP. I'll see what I can do about a testcase (or Eric will), however, would you mind reverting in the meantime? Thanks! -eric On Wed, Jan 30, 2019 at 4:41 PM Julian Lettner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Autho

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread Rafael Auler via Phabricator via cfe-commits
rafauler updated this revision to Diff 184467. rafauler added a comment. Thanks for reviewing! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56928/new/ https://reviews.llvm.org/D56928 Files: lib/Sema/SemaTemplateInstantiateDecl.cpp test/CodeGenCXX/attr-used-

[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

2019-01-31 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D54438#1375858 , @george.karpenkov wrote: > After this landed, options for RetainCountChecker stopped working - e.g. I > can't use `osx.cocoa.RetainCount:blah=X`. > Do you know why is this the case / how to fix it? That's

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread Rafael Auler via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC352740: Support attribute used in member funcs of class templates (authored by rafauler, committed by ). Changed prior to commit: https://reviews.llvm.org/D56928?vs=184467&id=184470#toc Repository: r

[PATCH] D56581: [ASTImporter] Set the described template if not set

2019-01-31 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > @martong have you had a chance to look at this some more? We ran into another > problem that this fixes partially. I didn't have time to deal with this yet (these days we are preparing an internal release and that took away my time). > Can I help in any way? I think

[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

2019-01-31 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D54438#1378425 , @Szelethus wrote: > In D54438#1375858 , > @george.karpenkov wrote: > > > After this landed, options for RetainCountChecker stopped working - e.g. I > > can't use `osx

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tidy/abseil/WrapUniqueCheck.cpp:27 + + return (ArgRef.str().length() > 0) ? ArgRef.str() + ")" : "()"; +} couldn't this be ``` return (!ArgRef.empty()) ? ArgRef.str() + ")" : "()"; ``` You know I think t

[PATCH] D57502: [ASTDump] Make template specialization tests more exact

2019-01-31 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D57502 Files: test/AST/ast-dump-decl.cpp Index: test/AST/ast-dump-decl.cpp

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tidy/abseil/WrapUniqueCheck.cpp:54 + const auto *facExpr = Result.Nodes.getNodeAs("facCons"); + const auto *callExpr = Result.Nodes.getNodeAs("callExpr"); + I'm not sure how expensive getNodeAs is... or if

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tidy/abseil/WrapUniqueCheck.h:27 +private: + std::string getArgs(const SourceManager *SM, const CallExpr *MemExpr); + Nit: could this method could be static in the cpp file and not in the header? Reposito

[PATCH] D57353: [clang-tidy] Add the abseil-duration-double-conversion check

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: docs/clang-tidy/checks/abseil-duration-double-conversion.rst:20 + + + // Original - Conversion to integer and back again hwright wrote: > MyDeveloperDay wrote: > > hwright wrote: > > > Eugene.Zelenko wrote: > > >

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 184475. JonasToth added a comment. - [Misc] rewrite parts of a comment that were unprecise. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57100/new/ https://reviews.llvm.org/D57100 Files: clang-tidy/bugpron

[clang-tools-extra] r352741 - [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-31 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Thu Jan 31 02:46:37 2019 New Revision: 352741 URL: http://llvm.org/viewvc/llvm-project?rev=352741&view=rev Log: [clang-tidy] refactor bugprone-exception-escape analysis into class Summary: The check `bugprone-exception-escape` does an AST-based analysis to determine if a f

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D57100#1377687 , @baloghadamsoftware wrote: > In D57100#1373440 , @JonasToth wrote: > > > @baloghadamsoftware Do you see any problems with the refactoring, > > especially the new `Fun

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-31 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352741: [clang-tidy] refactor bugprone-exception-escape analysis into class (authored by JonasToth, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D57108: [clang-tidy] diagnose possibiltiy to add 'noexcept' in modernize-use-noexcept

2019-01-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 184477. JonasToth added a comment. - Merge branch 'master' into feature-introduce-noexcept Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57108/new/ https://reviews.llvm.org/D57108 Files: clang-tidy/moderniz

[PATCH] D57108: [clang-tidy] diagnose possibiltiy to add 'noexcept' in modernize-use-noexcept

2019-01-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please add tests with lambdas, Comment at: test/clang-tidy/modernize-use-noexcept-new-noexcept.cpp:5-6 + +void undefined(); +void undefinedNoexcept() noexcept; + Unused functions. I suspect if the first one called, we can't be optimi

[PATCH] D57497: [RISCV] Passing -G value to RISCV backend

2019-01-31 Thread Simon Cook via Phabricator via cfe-commits
simoncook added a comment. As this mllvm option only affects the creation of ELF objects, do we also need to add a similar option for the LTO case, as the -G value would have no effect otherwise? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57497/new/ https://

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 4 inline comments as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2309 + attr.getScopeName(), attr.getScopeLoc(), &AU, + attr.getNumArgs(), ParsedAttr::AS_GNU); +

r352740 - Support attribute used in member funcs of class templates

2019-01-31 Thread Rafael Auler via cfe-commits
Author: rafauler Date: Thu Jan 31 01:38:31 2019 New Revision: 352740 URL: http://llvm.org/viewvc/llvm-project?rev=352740&view=rev Log: Support attribute used in member funcs of class templates Summary: As PR17480 describes, clang does not support the used attribute for member functions of class t

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2303 +auto &Function = DeclaratorInfo.getFunctionTypeInfo(); +auto &MQ = Function.getOrCreateMethodQualifiers(); +for (auto &attr : DeclaratorInfo.getAt

[PATCH] D57021: [clangd] Suggest adding missing includes for typos (like include-fixer).

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57021/new/ https://reviews.llvm.org/D57021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } Anastasia wrote: > ebevhan wrote: > > Is there a reason that the attributes are parsed here and not in > > `ParseFunctionDeclar

[PATCH] D57507: [clang] Add getCommentHandler to PreambleCallbacks

2019-01-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ilya-biryukov, ioeric. Herald added a subscriber: cfe-commits. Enables users to add comment handlers to preprocessor when building preambles. Repository: rC Clang https://reviews.llvm.org/D57507 Files: include/clang/Frontend/Precomp

[PATCH] D57508: [clangd] Enable include insertion for static index

2019-01-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: ioeric, ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, javed.absar. This enables include insertion by adding canonical includes into preambledata. Repository: rCTE Clang Tools Extra https://reviews.ll

[PATCH] D57502: [ASTDump] Make template specialization tests more exact

2019-01-31 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! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57502/new/ https://reviews.llvm.org/D57502 ___

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. This change broke building Swift on my Linux box. The compiler confusingly complains about the *same* template being both explicitly specialized and implicitly instantiated: /home/dave/s/u/swift/stdlib/public/runtime/ProtocolConformance.cpp:34:38: error: explici

[PATCH] D56928: Support attribute used in member funcs of class templates

2019-01-31 Thread Rafael Auler via Phabricator via cfe-commits
rafauler added a comment. Hi davezarzycki, thanks for reporting this! This is not expected, I'll revert this diff for now. Sorry for this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56928/new/ https://reviews.llvm.org/D56928 ___

r352748 - Revert "Support attribute used in member funcs of class templates"

2019-01-31 Thread Rafael Auler via cfe-commits
Author: rafauler Date: Thu Jan 31 05:31:33 2019 New Revision: 352748 URL: http://llvm.org/viewvc/llvm-project?rev=352748&view=rev Log: Revert "Support attribute used in member funcs of class templates" This reverts commit 352740: broke swift build Removed: cfe/trunk/test/CodeGenCXX/attr-use

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. This would make diagnostic fixits more discoverable, especially for plugins like YCM. Repository: rCTE Clang Tools Extra https://revie

[PATCH] D57464: Generalize method overloading on addr spaces to C++

2019-01-31 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/Parse/ParseDeclCXX.cpp:2313 +} + } Anastasia wrote: > Anastasia wrote: > > ebevhan wrote: > > > Is there a reason that the attributes are parsed here and not in > > > `ParseFunctionDeclarator` like the rest o

Re: r352690 - [Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls

2019-01-31 Thread Eric Liu via cfe-commits
And the stack trace is: ``` 1. parser at end of file [31/1788] 2. Code generation 3. Running pass 'Function Pass Manager' on module 'absl/base/internal/throw_delegate.cc'. 4. Running pass 'X86 DAG->DAG Instruction Selectio

r352755 - Revert "[Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls"

2019-01-31 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Jan 31 06:20:02 2019 New Revision: 352755 URL: http://llvm.org/viewvc/llvm-project?rev=352755&view=rev Log: Revert "[Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls" This reverts commit r352690. This causes clang to crash. Sent re

[PATCH] D57345: Make clang/test/Index/pch-from-libclang.c pass in more places

2019-01-31 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. erik.pilkington, can you take a look? Looks like arphaman isn't around. Since this touches libclang, I figure it might make sense if one of you takes a look. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57345/new/ https://reviews.llvm.org/D57345

[PATCH] D57108: [clang-tidy] diagnose possibiltiy to add 'noexcept' in modernize-use-noexcept

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tidy/modernize/UseNoexceptCheck.h:1 //===--- UseNoexceptCheck.h - clang-tidy-*- C++ -*-===// // Nit: sorry OCD kicking in... space after tidy and before first - Repository: rCT

[PATCH] D57435: [clang-tidy] Add abseil-wrap-unique check

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This is the clang-tidy revision that mgiht have caught the str().length() > 0 case D56644: [clang-tidy] readability-container-size-empty handle std::string length() adding a a cross reference for that work. Repository: rCTE

[PATCH] D56644: [clang-tidy] readability-container-size-empty handle std::string length()

2019-01-31 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: test/clang-tidy/readability-container-size-empty.cpp:135 + // CHECK-FIXES: {{^ }}if (str.empty()){{$}} + if (str.length() == 0) +; could you add a test that checks if StringRef.str().length() >0 becomes !

[PATCH] D57513: [please ignore] Clang test revision for new Herald rules for Github monorepo

2019-01-31 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 184499. benhamilton added a comment. Herald added a subscriber: cfe-commits. Herald added a project: clang. - Another update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57513/new/ https://reviews.llvm.org

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Dropping by: Maybe add `(fix available)` as a prefix rather than suffix. Since long texts might end up getting truncated(especially in vim) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57509/new/ https://reviews.llvm.org/

r352760 - [OpenCL] Fixed addr space manging test.

2019-01-31 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Thu Jan 31 07:23:48 2019 New Revision: 352760 URL: http://llvm.org/viewvc/llvm-project?rev=352760&view=rev Log: [OpenCL] Fixed addr space manging test. Fixed typo in the Filecheck directive and changed the test to verify output correctly. Fixes PR40029! Modified: cfe/

r352761 - Accomodate gcc 7.3.0's -Wdangling-else

2019-01-31 Thread Nico Weber via cfe-commits
Author: nico Date: Thu Jan 31 07:26:03 2019 New Revision: 352761 URL: http://llvm.org/viewvc/llvm-project?rev=352761&view=rev Log: Accomodate gcc 7.3.0's -Wdangling-else Modified: cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp Modified: cfe/trunk/unittests/StaticAnalyzer/R

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 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. In D57509#1378696 , @kadircet wrote: > Dropping by: Maybe add `(fix available)` as a prefix rather than suffix. > Since long texts might end up g

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 184510. ioeric marked 2 inline comments as done. ioeric added a comment. - address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57509/new/ https://reviews.llvm.org/D57509 Files: clangd/Diagnostics.cp

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D57509#1378707 , @sammccall wrote: > In D57509#1378696 , @kadircet wrote: > > > Dropping by: Maybe add `(fix available)` as a prefix rather than suffix. > > Since long texts might end up

[clang-tools-extra] r352764 - [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Jan 31 08:09:25 2019 New Revision: 352764 URL: http://llvm.org/viewvc/llvm-project?rev=352764&view=rev Log: [clangd] Append "(fix available)" to diagnostic message when fixes are present. Summary: This would make diagnostic fixits more discoverable, especially for plugins

[PATCH] D54429: [analyzer] Creating standard Sphinx documentation

2019-01-31 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. @NoQ @dcoughlin @george.karpenkov Any objections to this? :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54429/new/ https://reviews.llvm.org/D54429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D57345: Make clang/test/Index/pch-from-libclang.c pass in more places

2019-01-31 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington resigned from this revision. erik.pilkington added a comment. Sorry, this really seems more like @arphaman's wheelhouse. I'll ping him to take a look though. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57345/new/ https://reviews.llvm.org/D57345

[PATCH] D57521: [CMake] External compiler-rt-configure requires LLVMTestingSupport when including tests

2019-01-31 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz created this revision. sgraenitz added reviewers: ab, beanz. Herald added subscribers: erik.pilkington, mgorny, dberris. Apparently `LLVMTestingSupport` must be built before `llvm-config` can be asked for it. Symptom with `LLVM_INCLUDE_TESTS=ON` is: $ ./path/to/llvm-build/bin/llvm-co

[PATCH] D57521: [CMake] External compiler-rt-configure requires LLVMTestingSupport when including tests

2019-01-31 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz updated this revision to Diff 184531. sgraenitz added a comment. Polishing Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57521/new/ https://reviews.llvm.org/D57521 Files: runtime/CMakeLists.txt Index: runtime/CMakeLists.txt

[PATCH] D57524: Fix ICE on attempt to add an addr space qual to a type qualified by an addr space

2019-01-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. If `cv2T2` has an address space and we are creating a qualified type `cv1T4` adding new addr space qualifier an ICE is triggered. To avoid this ICE we first create a duplicate of `cv2T2` omitting its original addr space. The

[PATCH] D57523: Fix uninitialized value in ABIArgInfo

2019-01-31 Thread serge via Phabricator via cfe-commits
serge-sans-paille created this revision. serge-sans-paille added a reviewer: hans. Herald added a subscriber: cfe-commits. GCC-9 takes advantage of this uninitialized values to optimize stuff, which ends up in failing validation when compiling clang. This fixes https://bugs.llvm.org/show_bug.cgi

[PATCH] D57521: [CMake] External compiler-rt-configure requires LLVMTestingSupport when including tests

2019-01-31 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. FYI: Seems to be happening since D55891 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57521/new/ https://reviews.llvm.org/D57521 ___ cfe-commits mailing li

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL352764: [clangd] Append "(fix available)" to diagnostic message when fixes are present. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE L

[PATCH] D55891: [compiler-rt] [xray] [tests] Detect and handle missing LLVMTestingSupport gracefully

2019-01-31 Thread Stefan Gränitz via Phabricator via cfe-commits
sgraenitz added a comment. In case compiler-rt abandons `llvm-config` in favor of `find_package(LLVM)` one day, we could drop the `COMPILER_RT_HAS_LLVMTESTINGSUPPORT` logic here and use imported target properties instead. It seems a cleaner solution to me and avoids issues like D57521

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could this be made optional for VSCode? As mentioned in the discussion before, I would personally prefer to turn it off, even though I do acknowledge the need for this for some clients, e.g. vim. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In D57509#1378928 , @ilya-biryukov wrote: > Could this be made optional for VSCode? > As mentioned in the discussion before, I would personally prefer to turn it > off, even though I do acknowledge the need for this for some clie

[PATCH] D57021: [clangd] Suggest adding missing includes for typos (like include-fixer).

2019-01-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/IncludeFixer.cpp:74 +break; + default: +assert(RecordTypo); "default" looks a bit scary - could still end up with false positives. Can we cover a few of the most common cases (even if we know they're no

[PATCH] D57507: [clang] Add getCommentHandler to PreambleCallbacks

2019-01-31 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, just a few nits Comment at: include/clang/Frontend/PrecompiledPreamble.h:286 virtual std::unique_ptr createPPCallbacks(); + /// Adds the returned Comm

[PATCH] D56555: Add Attribute to define nonlazy objc classes

2019-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3506 +add the class to the list of non-lazily initialized classes. These are classes +that are realized at objc_init() time rather than when first referenced. + }]; aaron.ballman

[PATCH] D57474: Update SanitizerCoverage doc regarding the issue with pc-table and gc-sections.

2019-01-31 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: docs/SanitizerCoverage.rst:149 +(``-Wl,-gc-sections``), thus resulting in a significant binary size overhead. +See `Bug 34636 `_ for more info. + Maybe add "for linkers othe

[PATCH] D57488: [CUDA] add support for the new kernel launch API in CUDA-9.2+.

2019-01-31 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 184543. tra marked 8 inline comments as done. tra edited the summary of this revision. tra added a comment. Addressed Justin's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57488/new/ https://reviews.llvm.org/D57488 Files: clang/include/cla

[PATCH] D57345: Make clang/test/Index/pch-from-libclang.c pass in more places

2019-01-31 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. Makes sense. The comments aren't really enforceable though, can we just factor this out into one function in lib/Basic that can be shared between all sites? It seems like there's nothing t

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D57509#1378943 , @ioeric wrote: > Yes, but a new option seems a bit of an overkill here. The text is appended > and doesn't seem to affect the readability of original diagnostic message > much (IMO). Could you elaborat

[PATCH] D57488: [CUDA] add support for the new kernel launch API in CUDA-9.2+.

2019-01-31 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:239 +CGM.Error(CGF.CurFuncDecl->getLocation(), + "Can't find declaration for cudaLaunchKernel()"); // FIXME. +return; jlebar wrote: > Unfixed FIXME? Fixed the comment. :-)

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. FWIW, I don't think this is worth adding an option or protocol extensions for at this point. There are pros and cons to showing this in VSCode (pros are visibility without hovering, particularly in problems view and cross-editor consistency, cons are certainly noise

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a subscriber: hokein. ioeric added a comment. In D57509#1378978 , @ilya-biryukov wrote: > In D57509#1378943 , @ioeric wrote: > > > Yes, but a new option seems a bit of an overkill here. The text is >

[PATCH] D57527: Do not copy floating pointer format from aux target

2019-01-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: rjmccall. rC352620 caused regressions because it copied floating point format from aux target. floating point format decides whether extended long double is supported. It is x86_fp80 on x86 but IEEE double

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/Stmt.h:1300 + void setStmtExpr(Stmt *S) { +assert(!body_empty() && "setStmtExpr"); +unsigned ExprResult = getLastNonNullStmt(); domdom wrote: > getLastNonNullStmt asserts anyway, sh

[PATCH] D56851: [ASTMatchers] Adds `CXXMemberCallExpr` matcher `invokedAtType`.

2019-01-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3300 +/// matches `x.m()` and `p->m()`. +AST_MATCHER_P_OVERLOAD(clang::CXXMemberCallExpr, invokedAtType, + clang::ast_matchers::internal::Matcher, --

[PATCH] D57524: Fix ICE on attempt to add an addr space qual to a type qualified by an addr space

2019-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaInit.cpp:4693 +T2Quals.addAddressSpace(AS2); + QualType WithAScv1T4 = S.Context.getQualifiedType(IgnoreAScv2T2, T1Quals); + Sequence.AddQualificationConversionStep(WithAScv1T4, ValueKind); ---

[PATCH] D57528: [tools] Fix python DeprecationWarning: invalid escape sequence

2019-01-31 Thread Marco Falke via Phabricator via cfe-commits
MarcoFalke created this revision. Herald added subscribers: cfe-commits, whisperity. Herald added a reviewer: serge-sans-paille. The python documentation says "it’s highly recommended that you use raw strings for all but the simplest expressions." (https://docs.python.org/3/library/re.html) So

[PATCH] D57509: [clangd] Append "(fix available)" to diagnostic message when fixes are present.

2019-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > I don't think it's pure noise. Vscode displays diagnostics in the "PROBLEMS" > tab. A suffix allows you to tell whether fixes are available without hovering > on the errors. And it shows bulb icons when you hover over diagnostics in this dialog too. To be clear

[PATCH] D57527: Do not copy floating pointer format from aux target

2019-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Okay, so you silently have an incompatible ABI for anything in the system headers that mentions `long double`. Do you have any plans to address or work around that, or is the hope that it just doesn't matter? I feel like this should be a special case for AMDGPU rather

[PATCH] D45978: dllexport const variables must have external linkage.

2019-01-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: majnemer. aaron.ballman added a subscriber: majnemer. aaron.ballman added inline comments. Comment at: test/Sema/dllexport.c:70 +// const variables +__declspec(dllexport) int const x = 3; zahiraam wrote: > aaron.ballman wrote: >

[PATCH] D57207: [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈

2019-01-31 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 with a commenting request. Comment at: test/clang-tidy/google-objc-function-naming.m:5-8 +static void TestImplicitlyDefinedFunction(int a) { + printf("%d"

[PATCH] D57527: Do not copy floating pointer format from aux target

2019-01-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D57527#1379065 , @rjmccall wrote: > Okay, so you silently have an incompatible ABI for anything in the system > headers that mentions `long double`. Do you have any plans to address or > work around that, or is the hope that i

[PATCH] D57207: [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈

2019-01-31 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore marked 3 inline comments as done. stephanemoore added a comment. Thanks for the review! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57207/new/ https://reviews.llvm.org/D57207 ___ cfe-com

[PATCH] D57207: [clang-tidy] Make google-objc-function-naming ignore implicit functions 🙈

2019-01-31 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 184553. stephanemoore marked an inline comment as done. stephanemoore added a comment. Add comment explaining that builtin function call generates implicit function declaration and update calling function name for improved clarity. Repository: rCTE

[PATCH] D57527: Do not copy floating pointer format from aux target

2019-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D57527#1379088 , @yaxunl wrote: > In D57527#1379065 , @rjmccall wrote: > > > Okay, so you silently have an incompatible ABI for anything in the system > > headers that mentions `long do

[PATCH] D57532: [Index] Make sure c-index-test finds libc++ on Mac

2019-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: thakis, ioeric. Herald added a reviewer: EricWF. Herald added subscribers: llvm-commits, arphaman. Herald added a project: clang. Specifically, the version of libc++ that lives alongside the c-index-test binary. After r348365 driv

[PATCH] D57532: [Index] Make sure c-index-test finds libc++ on Mac

2019-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I'm not sure who the owners of c-index-test are, so adding people who touched the file recently or might be interested in this landing. Suggestions for other reviewers are **very** welcome. Still struggling to make one test pass: `Index/index-file.cu` fails with:

[PATCH] D57345: Make clang/test/Index/pch-from-libclang.c pass in more places

2019-01-31 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Could it be somewhere in lib/Driver? libclang depends on lib/Frontend which depends on lib/Driver -- is there any reason libclang can't depend on lib/Driver? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57345/new/ https://reviews.llvm.org/D57345 ___

[PATCH] D57472: [AST] Extract ASTDumpTraverser class from ASTDumper

2019-01-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTDumpTraverser.h:31 + +ASTDumpTraverser traverses the Clang AST for dumping purposes + Missing full stop at the end of the sentence. Comment at: include/clang/AST/ASTDumpTrave

r352788 - [CodeComplete] Propagate preferred types through parser in more cases

2019-01-31 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Jan 31 12:20:32 2019 New Revision: 352788 URL: http://llvm.org/viewvc/llvm-project?rev=352788&view=rev Log: [CodeComplete] Propagate preferred types through parser in more cases Preferred types are used by code completion for ranking. This commit considerably increases

[PATCH] D56723: [CodeComplete] Propagate preferred types through parser in more cases

2019-01-31 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC352788: [CodeComplete] Propagate preferred types through parser in more cases (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D56723?vs=184038&id=184568#toc Re

[PATCH] D57527: Do not copy long double and 128-bit fp format from aux target for AMDGPU

2019-01-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 184569. yaxunl retitled this revision from "Do not copy floating pointer format from aux target" to "Do not copy long double and 128-bit fp format from aux target for AMDGPU". yaxunl edited the summary of this revision. yaxunl added a comment. Herald added sub

[PATCH] D57527: Do not copy long double and 128-bit fp format from aux target for AMDGPU

2019-01-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D57527#1379159 , @rjmccall wrote: > In D57527#1379088 , @yaxunl wrote: > > > In D57527#1379065 , @rjmccall > > wrote: > > > > > Okay, so you silen

[PATCH] D54429: [analyzer] Creating standard Sphinx documentation

2019-01-31 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. I think let's get this up and running and slowly redirect links from the front page to the new docs until only the front page is left? Comment at: docs/analyzer/checkers.rst:36-37

r352791 - [opaque pointer types] Add a FunctionCallee wrapper type, and use it.

2019-01-31 Thread James Y Knight via cfe-commits
Author: jyknight Date: Thu Jan 31 12:35:56 2019 New Revision: 352791 URL: http://llvm.org/viewvc/llvm-project?rev=352791&view=rev Log: [opaque pointer types] Add a FunctionCallee wrapper type, and use it. The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful conven

[PATCH] D57527: Do not copy long double and 128-bit fp format from aux target for AMDGPU

2019-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Explanatory comment, please. Otherwise LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57527/new/ https://reviews.llvm.org/D57527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D57315: [opaque pointer types] Add a FunctionCallee wrapper type, and use it.

2019-01-31 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC352791: [opaque pointer types] Add a FunctionCallee wrapper type, and use it. (authored by jyknight, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D57438: [Sema][ObjC] Allow declaring ObjC pointer members in C++ unions under ARC

2019-01-31 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:7033 + // member of an ObjC pointer type, except when it has an in-class initializer, + // it doesn't make the defaulted default constructor defined as deleted. + if (!FieldType.hasNonTrivialObjCLifetime() |

[PATCH] D57345: Make clang/test/Index/pch-from-libclang.c pass in more places

2019-01-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Yes, that should work. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57345/new/ https://reviews.llvm.org/D57345 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

r352793 - [WebAssembly] Add bulk memory target feature

2019-01-31 Thread Thomas Lively via cfe-commits
Author: tlively Date: Thu Jan 31 13:02:19 2019 New Revision: 352793 URL: http://llvm.org/viewvc/llvm-project?rev=352793&view=rev Log: [WebAssembly] Add bulk memory target feature Summary: Also clean up some preexisting target feature code. Reviewers: aheejin Subscribers: dschuff, sbc100, jgrave

[PATCH] D57527: Do not copy long double and 128-bit fp format from aux target for AMDGPU

2019-01-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D57527#1379287 , @rjmccall wrote: > Explanatory comment, please. Otherwise LGTM. will do when committing. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57527/new/ https://reviews.llvm.org/D57527 _

[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

2019-01-31 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman requested changes to this revision. arphaman added a comment. This revision now requires changes to proceed. Do you know if this have an effect on the output of completion results or other tooling-based output? A couple of requests: - This behavior should be controlled by a printing po

Re: r352793 - [WebAssembly] Add bulk memory target feature

2019-01-31 Thread Roman Lebedev via cfe-commits
And another review that omitted lists. On Fri, Feb 1, 2019 at 12:02 AM Thomas Lively via cfe-commits wrote: > > Author: tlively > Date: Thu Jan 31 13:02:19 2019 > New Revision: 352793 > > URL: http://llvm.org/viewvc/llvm-project?rev=352793&view=rev > Log: > [WebAssembly] Add bulk memory target f

[PATCH] D55782: Fix isInSystemMacro to handle pasted token

2019-01-31 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/Basic/SourceManager.h:1466 +// its spelling is the scratch memory, so we take the parent context. +if(isWrittenInScratchSpace(getSpellin

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.h:63 +/// Turns a token range into a half-open range and checks its correctness. +/// The resulting range will have only valid source location on both sides, both sammccall wr

[PATCH] D56611: [clangd] A code action to swap branches of an if statement

2019-01-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 184588. ilya-biryukov marked 8 inline comments as done. ilya-biryukov added a comment. Herald added a project: clang. Herald added a subscriber: llvm-commits. - Remove Dummy.cpp - Add halfOpenRangeTouches - Add a comment about file vs expansion locations

  1   2   >