[PATCH] D55270: [Sema] Further improvements to to static_assert diagnostics.

2018-12-10 Thread Clement Courbet via Phabricator via cfe-commits
courbet added a comment. Thanks. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55270/new/ https://reviews.llvm.org/D55270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

r348741 - [Sema] Further improvements to to static_assert diagnostics.

2018-12-10 Thread Clement Courbet via cfe-commits
Author: courbet Date: Mon Dec 10 00:19:38 2018 New Revision: 348741 URL: http://llvm.org/viewvc/llvm-project?rev=348741&view=rev Log: [Sema] Further improvements to to static_assert diagnostics. Summary: We're now handling cases like `static_assert(!expr)` and static_assert(!(expr))`. Reviewers:

[PATCH] D55270: [Sema] Further improvements to to static_assert diagnostics.

2018-12-10 Thread Clement Courbet via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348741: [Sema] Further improvements to to static_assert diagnostics. (authored by courbet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 📙

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: test/clang-tidy/google-objc-function-naming.m:8 +// must be in Pascal case as required by Google Objective-C style guide // CHECK-FIXES: static bool Ispositive(int a) { return a > 0; } I realize there are words

r348742 - Revert r348741 "[Sema] Further improvements to to static_assert diagnostics."

2018-12-10 Thread Clement Courbet via cfe-commits
Author: courbet Date: Mon Dec 10 00:53:17 2018 New Revision: 348742 URL: http://llvm.org/viewvc/llvm-project?rev=348742&view=rev Log: Revert r348741 "[Sema] Further improvements to to static_assert diagnostics." Seems to break build bots. Modified: cfe/trunk/include/clang/Sema/Sema.h cfe

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Just a few minor remarks and a possible workaround for testing `CHECK-FIXES: [[nodiscard]]`. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:43 + // fu

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D55433#1323779 , @lebedev.ri wrote: > In D55433#1323757 , @MyDeveloperDay > wrote: > > > a lot of projects aren't setup for c++17 yet which is needed for > > [[nodiscard]] to be allo

[PATCH] D53655: [ASTImporter] Fix redecl chain of classes and class templates

2018-12-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @rsmith Please raise any objections until Dec 14 (or if this deadline is too strict). I'd like to commit this next week latest so it can get in still this year. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53655/new/ https://reviews.ll

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177474. MyDeveloperDay marked 11 inline comments as done. MyDeveloperDay added a comment. - Addressing review comments and concerns - Removed internal function logic and option, not really the role of this checker - Fixed grammatical error in documenta

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:43 + // function like _Foo() + if (ignore){ + return doesFunctionNameStartWithUnderScore(&Node); curdeius wrote: > If think that you should run clang-format over yo

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-nodiscard.rst:62 +Users can use :option:`IgnoreInternalFunctions` to turn off the adding of +``[nodiscard]]`` to functions starting with _ e.g.

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D55433#1325117 , @lebedev.ri wrote: > In D55433#1323779 , @lebedev.ri > wrote: > > > In D55433#1323757 , > > @MyDeveloperDay wrote: > > >

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-10 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael updated this revision to Diff 177477. mikael marked an inline comment as not done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54862/new/ https://reviews.llvm.org/D54862 Files: include/clang/AST/CanonicalType.h include/clang/AST/DeclCXX.h include/clang/AST/Type.h include

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-10 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael added a comment. I rebased on Friday, and noticed that I broke two tests: Failing Tests (2): Clang :: CodeGenOpenCLCXX/template-address-spaces.cl Clang :: SemaOpenCLCXX/address-space-templates.cl This upload contains a few extra fixes. CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-10 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked 4 inline comments as done. mikael added inline comments. Comment at: lib/Sema/SemaDecl.cpp:3196 + +QualType AdjustedQT = QualType(AdjustedType, 0); +LangAS AS = Old->getType().getAddressSpace(); When merging the class function and the file c

[PATCH] D48866: [clang-tidy] Add incorrect-pointer-cast checker

2018-12-10 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In my opinion, after migrating relevant test cases from D33826 , this is ready. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48866/new/ https://reviews.llvm.org/D48866

[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

2018-12-10 Thread Reuben Thomas via Phabricator via cfe-commits
reuk added a subscriber: klimek. reuk added a comment. Would someone review this please? I'm not sure who to add for review (sorry), maybe one of the following? @klimek @Typz @krasimir Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55170/new/ https://reviews.llvm

[PATCH] D55428: [Docs] Expand -fstack-protector and -fstack-protector-all info

2018-12-10 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre added inline comments. Comment at: include/clang/Driver/Options.td:1634-1636 + HelpText<"Uses a stronger heuristic to apply stack protectors to functions " + "that include arrays of any size (and any type), " + "as well as any calls to alloca or the ta

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-12-10 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hi, A late question about this change. I notice that this change sometimes gives me additional DIFiles in the clang output compared to before. E.g. if I have a file /tmp/bar/foo.c containing just void foo() { } and I stand in /tmp/ and do clang -emit-llvm -S -g /tmp

r348752 - [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-12-10 Thread Andrew Savonichev via cfe-commits
Author: asavonic Date: Mon Dec 10 04:03:00 2018 New Revision: 348752 URL: http://llvm.org/viewvc/llvm-project?rev=348752&view=rev Log: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast Summary: If a function argument is byval and RV is located in default or alloca address space an optimi

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-12-10 Thread Andrew Savonichev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348752: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast (authored by asavonic, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54947/new/ https://r

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-10 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. Reminder: I'll need somebody to submit this for me, since I don't have subversion access. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 ___ cfe-commits mailing list cfe-co

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-10 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/abseil/DurationRewriter.cpp:20-39 +struct DurationScale2IndexFunctor { + using argument_type = DurationScale; + unsigned operator()(DurationScale Scale) const { +switch (Scale) { +case DurationScale::Hours: +

[PATCH] D55475: Misc typos fixes in ./lib folder

2018-12-10 Thread Raphael Isemann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348755: Misc typos fixes in ./lib folder (authored by teemperor, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55475/new/ https://reviews.llvm.org/D55475

r348755 - Misc typos fixes in ./lib folder

2018-12-10 Thread Raphael Isemann via cfe-commits
Author: teemperor Date: Mon Dec 10 04:37:46 2018 New Revision: 348755 URL: http://llvm.org/viewvc/llvm-project?rev=348755&view=rev Log: Misc typos fixes in ./lib folder Summary: Found via `codespell -q 3 -I ../clang-whitelist.txt -L uint,importd,crasher,gonna,cant,ue,ons,orign,ned` Reviewers: t

[PATCH] D55346: [clang-tidy] check for using declaration qualification

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/abseil/QualifiedAliasesCheck.cpp:29 + // Finds the nested-name-specifier location. + const NestedNameSpecifierLoc QualifiedLoc = MatchedDecl->getQualifierLoc(); + const SourceLocation FrontLoc = QualifiedLoc.getBeginL

[PATCH] D55411: [clang-tidy] check for flagging using declarations not in the inner most namespace

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/abseil/SafelyScopedCheck.cpp:22 + // The target using declaration is either: + // 1. not in any namespace declaration, or + // 2. in some namespace declaration but not in the innermost layer Why is th

[PATCH] D55409: [clang-tidy] check for using declarations not in an anonymous namespace when there exists one

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/abseil/AnonymousEnclosedAliasesCheck.cpp:32 +void AnonymousEnclosedAliasesCheck::check(const MatchFinder::MatchResult &Res

[PATCH] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Have you run this check over any large code bases to see what its false positive rate looks like? I have to imagine we're going to need some escape hatch for system headers (we shouldn't complain about using declarations outside of the user's control).

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Missing test cases. Comment at: clang/lib/Sema/SemaType.cpp:5747 +static bool BuildAddressSpaceIndex(LangAS &ASIdx, const Expr *AddrSpace, +

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

2018-12-10 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp added a comment. @dcoughlin @NoQ ping... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54429/new/ https://reviews.llvm.org/D54429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Thank you for this fix! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55508/new/ https://reviews.llvm.org/D55508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-nodiscard.rst:37 + +Specify a macro to use instead of ``[[nodiscard]]``. +This is useful when maintaining source code that needs to compile with a pre-C++17 compiler. Specifi

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D55508#1325316 , @Eugene.Zelenko wrote: > Thank you for this fix! Your welcome, I was reviewing other revisions to try and get up to speed, and I saw you giving someone else the same comment you gave mine! I'm no pyt

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177496. MyDeveloperDay added a comment. Update the documentation to utilize 80 character lines CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/modernize-use-nodiscard.rst:37 + +Specify a macro to use instead of ``[[nodiscard]]``. This is useful when +maintaining source code that needs to compile with a pre-C++17 compiler. Option

[PATCH] D55510: [ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types

2018-12-10 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: rsmith, aaron.ballman, hfinkel. `memchr` and `memcmp` operate upon the character units of the object representation; that is, the `size_t` parameter expresses the number of character units. The constant folding

Re: r348665 - [tests] Fix the FileManagerTest getVirtualFile test on Windows

2018-12-10 Thread Aaron Ballman via cfe-commits
On Fri, Dec 7, 2018 at 6:52 PM Stella Stamenova via cfe-commits wrote: > > Author: stella.stamenova > Date: Fri Dec 7 15:50:05 2018 > New Revision: 348665 > > URL: http://llvm.org/viewvc/llvm-project?rev=348665&view=rev > Log: > [tests] Fix the FileManagerTest getVirtualFile test on Windows > > S

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Some more minor remarks. I'll give this check a try to see how it behaves on some of my projects. I agree that a high rate of false positives is possible (and is a bit of spoiler) but I wouldn't reject this IMO useful check because of that. Anyway, everything looks pret

r348762 - Use zip_longest for iterator range comparisons. NFC.

2018-12-10 Thread Michael Kruse via cfe-commits
Author: meinersbur Date: Mon Dec 10 07:16:37 2018 New Revision: 348762 URL: http://llvm.org/viewvc/llvm-project?rev=348762&view=rev Log: Use zip_longest for iterator range comparisons. NFC. Use zip_longest in two locations that compare iterator ranges. zip_longest allows the iteration using a ran

[PATCH] D55468: Use zip_longest for iterator range comparisons. NFC.

2018-12-10 Thread Michael Kruse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Meinersbur marked an inline comment as done. Closed by commit rC348762: Use zip_longest for iterator range comparisons. NFC. (authored by Meinersbur, committed by ). Changed prior to commit: https://reviews.llvm.org/D5546

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I guess the solution would be to check whether there are any user supplied flags with "analyze" substring, and add the compatibility flag then. It is possible if not probable that a non-static-analyzer related flag with a name like that will eventually be added, but I

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Lex/PPExpressions.cpp:154-156 // Consume the ). -Result.setEnd(PeekTok.getLocation()); PP.LexNonComment(PeekTok); +Result.setEnd(PeekTok.getLocation()); lebedev.ri wrote: > I'm not sure this i

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 177508. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Adding tests based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54450/new/ https://reviews.llvm.org/D54450 Files: include/clang/Lex/

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-12-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @a_sidorin The below diff on top of your patch successfully handles the failure with the `TestCModules.py` LLDB testcase: diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index 05fec7f943..e6fb590025 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/A

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-10 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 177509. hwright marked 5 inline comments as done. hwright added a comment. Use `static_cast` instead of a `switch` for `IndexedMap` lookup. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 Files: clang-tidy

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-10 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/DurationRewriter.cpp:20-39 +struct DurationScale2IndexFunctor { + using argument_type = DurationScale; + unsigned operator()(DurationScale Scale) const { +switch (Scale) { +case DurationScale::Hours: + re

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-12-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. There is another failure on macOS, which is not there on Linux. This is present with the 174545 patch id (even before applying my fix for TestCModules). $ ninja check-clang-astmerge Testing Time: 0.63s Failing Tests (4)

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-12-10 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 177510. Quuxplusone edited the summary of this revision. Quuxplusone added a comment. Address review comments. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47344/new/ https://reviews.llvm.org/D47344 Files: src/expe

r348764 - [libclang] Revert removal of tidy plugin support from libclang introduced in r347496

2018-12-10 Thread Ivan Donchevskii via cfe-commits
Author: yvvan Date: Mon Dec 10 07:58:50 2018 New Revision: 348764 URL: http://llvm.org/viewvc/llvm-project?rev=348764&view=rev Log: [libclang] Revert removal of tidy plugin support from libclang introduced in r347496 Differential Revision: https://reviews.llvm.org/D55415 Modified: cfe/trunk

[PATCH] D55415: Revert removal of tidy plugin support from libclang

2018-12-10 Thread Ivan Donchevskii via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348764: [libclang] Revert removal of tidy plugin support from libclang introduced in… (authored by yvvan, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/add_new_check.py:213 match = re.search('Improvements to clang-tidy', line) +match_next = re.search('Improvements to include-fixer', line) +match_checker = re.search('- New :doc:`(.*)', line)

[PATCH] D55482: [clang-tidy] Improve google-objc-function-naming diagnostics 📙

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/google/FunctionNamingCheck.cpp:114-125 + if (MatchedDecl->getStorageClass() == SC_Static) { +diag(MatchedDecl->getLocation(), + "static function name %0 must be in Pascal case as required by " + "Goo

[PATCH] D55395: Re-order content in OMPDeclareReductionDecl dump

2018-12-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/AST/ASTDumper.cpp:1056 } +NodeDumper.dumpPointer(Initializer); + } Better to output it immediately after `initializer` keyword. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 177517. arichardson added a comment. clang-format fix a failing test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td lib/AST/ExprConstant.cp

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 177519. arichardson marked 3 inline comments as done. arichardson added a comment. fix typo Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-10 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked 5 inline comments as done. arichardson added inline comments. Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:15 +// FIXME: After changing the subject from Function to HasFunctionProto, AllocSize is no longer listed (similar to Format, et

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/abseil/DurationRewriter.cpp:21 +struct DurationScale2IndexFunctor { + using argument_type = DurationScale; + unsigned operator()(DurationScale Scale) const { Are you using `argument_type`? Browser searchin

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:45 + // + for (const auto *Par : Node.parameters()) { +const Type *ParType = Par->getType().get

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177532. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. Addressing review comments, - additional unit tests for no ReplacementString and C++ 11 case - more expressive hasNonConstReferenceOrPointerArguments matcher - min

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-12-10 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47757/new/ https://reviews.llvm.org/D47757 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM. But I'm not a code owner here and I don't know if you need an acceptance of one of them. Great job. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews

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

2018-12-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I can't fix these right away, but I don't want myself to forget it before commiting. Pay no attention. Comment at: include/clang/StaticAnalyzer/Checkers/CheckerBase.td:51-56 +/// relies on information MallocBase gathers. +/// Example: +/// def Inne

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 177538. MyDeveloperDay added a comment. Fix review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55508/new/ https://reviews.llvm.org/D55508 Files: clang-tidy/add_new_check.py Index: clang-tidy/add_new_check.py ==

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @curdeius Thanks, I don't have commit access so I'm happy wait for a CODE_OWNER, they could likely have more input. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 __

[PATCH] D47111: : Implement monotonic_buffer_resource.

2018-12-10 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 177540. Quuxplusone marked 5 inline comments as done. Quuxplusone added a comment. @ericwf ping! Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47111/new/ https://reviews.llvm.org/D47111 Files: include/experimental/m

RE: r348665 - [tests] Fix the FileManagerTest getVirtualFile test on Windows

2018-12-10 Thread Stella Stamenova via cfe-commits
Our tests run on drive E:\ (not C:\) which is why we saw this test failing. After this change, the test can now run successfully for us because the temporary files are created and checked for on the C:\ drive. Before this change, the temporary files were created on the E:\ drive and checked for

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think this patch is fine, AFAIK these utility scripts are not tested directly but are just adjusted if they dont work as expected :) Did you test it with a fake new-check? If it does what we expect its fine :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D5

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Hi MyDeveloperDay, thanks for the patch! Mostly stylistic comments. Would it make sense to attach the attribute to the implementation of the functions too? This check is definitly useful, but noisy. Do you see a change of another heuristic that could be applied to re

[PATCH] D55510: [ExprConstant] Improve memchr/memcmp for type mismatch and multibyte element types

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/ExprConstant.cpp:6151 +Info.Ctx.getBaseElementType(getType(Result.getLValueBase())); +const bool IsRawByte = BuiltinOp == Builtin::BImemchr || + BuiltinOp == Builtin::BI__builtin_memchr

[PATCH] D55484: ComputeLineNumbers: delete SSE2 vectorization

2018-12-10 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D55484#1324983 , @bkramer wrote: > The performance difference on preprocessing huge files was tiny back then, > doesn't surprise me that it disappeared. What did you test this on? I tested it on cat lib/Sema/*.cpp lib/Code

Re: r348665 - [tests] Fix the FileManagerTest getVirtualFile test on Windows

2018-12-10 Thread Aaron Ballman via cfe-commits
On Mon, Dec 10, 2018 at 12:30 PM Stella Stamenova wrote: > > Our tests run on drive E:\ (not C:\) which is why we saw this test failing. > After this change, the test can now run successfully for us because the > temporary files are created and checked for on the C:\ drive. Before this > change

r348777 - ComputeLineNumbers: delete SSE2 vectorization

2018-12-10 Thread Fangrui Song via cfe-commits
Author: maskray Date: Mon Dec 10 10:10:35 2018 New Revision: 348777 URL: http://llvm.org/viewvc/llvm-project?rev=348777&view=rev Log: ComputeLineNumbers: delete SSE2 vectorization Summary: SSE2 vectorization was added in 2012, but it is 2018 now and I can't observe any performance boost (testing

[PATCH] D55484: ComputeLineNumbers: delete SSE2 vectorization

2018-12-10 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348777: ComputeLineNumbers: delete SSE2 vectorization (authored by MaskRay, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added a comment. In D55508#1325670 , @JonasToth wrote: > I think this patch is fine, AFAIK these utility scripts are not tested > directly but are just adjusted if they dont work as expected

RE: r348665 - [tests] Fix the FileManagerTest getVirtualFile test on Windows

2018-12-10 Thread Stella Stamenova via cfe-commits
The failure that you are getting when you run on the d:\ drive is what we were seeing before this change in our testing. What do you get without this change? Thanks, -Stella -Original Message- From: Aaron Ballman Sent: Monday, December 10, 2018 10:11 AM To: Stella Stamenova Cc: cfe-co

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. LGTM. Do you have commit access? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55508/new/ https://reviews.llvm.org/D55508 ___ cfe-

Re: [PATCH] D55377: Allow forwarding -fdebug-compilation-dir to cc1as

2018-12-10 Thread David Blaikie via cfe-commits
Would it be worth considering whether -fdebug-compilation-dir and -fdebug-prefix-map could be unified, perhaps by having a placeholder that could be used in -fdebug-prefix-map for the current directory? I guess they're low-maintenance enough that it's probably not, but figured I'd ask. On Thu, De

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-10 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55229/new/ https://reviews.llvm.org/D55229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: r348665 - [tests] Fix the FileManagerTest getVirtualFile test on Windows

2018-12-10 Thread Aaron Ballman via cfe-commits
On Mon, Dec 10, 2018 at 1:18 PM Stella Stamenova wrote: > > The failure that you are getting when you run on the d:\ drive is what we > were seeing before this change in our testing. What do you get without this > change? When I reverted the change, I got the same behavior -- so then I double-c

r348786 - Adding tests for -ast-dump; NFC.

2018-12-10 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Dec 10 10:37:47 2018 New Revision: 348786 URL: http://llvm.org/viewvc/llvm-project?rev=348786&view=rev Log: Adding tests for -ast-dump; NFC. This adds tests for expressions in C. Added: cfe/trunk/test/AST/ast-dump-expr.c Added: cfe/trunk/test/AST/ast-dump-expr

[PATCH] D55447: [Sema] Fix Modified Type in address_space AttributedType

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 177561. leonardchan marked an inline comment as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55447/new/ https://reviews.llvm.org/D55447 Files: clang/include/clang/Sema/Sema.h clang/lib/AST/TypePrinter.cpp clan

Re: r348685 - Move diagnostic enums into Basic.

2018-12-10 Thread David Blaikie via cfe-commits
Hey Richard, Thanks for cleaning up some of the layering here! I /think/ I vaguely recall having a conversation with Richard Smith about a different direction to fix the layering of the diagnostics system - but it was/is more involved. Ah, here, apparently I sent out a WIP patch & must've got eng

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D55508#1325758 , @JonasToth wrote: > LGTM. Do you have commit access? I do not I'm afraid CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55508/new/ https://reviews.llvm.org/D55508 __

[PATCH] D55525: [Driver] Add support for -fembed-bitcode for assembly file

2018-12-10 Thread Steven Wu via Phabricator via cfe-commits
steven_wu created this revision. steven_wu added reviewers: compnerd, dexonsmith. Herald added a subscriber: jkorous. Handle -fembed-bitcode for assembly inputs. When the input file is assembly, write a marker as "__LLVM,__asm" section. Fix llvm.org/pr39659 Repository: rC Clang https://revie

[PATCH] D21230: Do not embed all the cc1 options in bitcode commandline

2018-12-10 Thread Steven Wu via Phabricator via cfe-commits
steven_wu abandoned this revision. steven_wu added a comment. Herald added subscribers: jkorous, mehdi_amini. This is upstreamed by Saleem already CHANGES SINCE LAST ACTION https://reviews.llvm.org/D21230/new/ https://reviews.llvm.org/D21230 ___

r348789 - [constexpr][c++2a] Try-catch blocks in constexpr functions

2018-12-10 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Dec 10 11:03:12 2018 New Revision: 348789 URL: http://llvm.org/viewvc/llvm-project?rev=348789&view=rev Log: [constexpr][c++2a] Try-catch blocks in constexpr functions Implement support for try-catch blocks in constexpr functions, as proposed in http://wg21.link/P1002 and v

[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions

2018-12-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348789: [constexpr][c++2a] Try-catch blocks in constexpr functions (authored by bruno, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55097?v

[PATCH] D48342: [libcxx] Optimize vectors construction of trivial types from an iterator range with const-ness mismatch.

2018-12-10 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: libcxx/include/memory:1645 -template +template _LIBCPP_INLINE_VISIBILITY Quuxplusone wrote: > ldionne wrote: > > Coming at it from a slightly different angle, I would think this is what we > > want:

r348790 - Add an explicit triple to this test to fix failing test bots.

2018-12-10 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Mon Dec 10 11:18:11 2018 New Revision: 348790 URL: http://llvm.org/viewvc/llvm-project?rev=348790&view=rev Log: Add an explicit triple to this test to fix failing test bots. Modified: cfe/trunk/test/AST/ast-dump-expr.c Modified: cfe/trunk/test/AST/ast-dump-expr.c U

[PATCH] D55500: [Builtins] Implement __builtin_is_constant_evaluated for use in C++2a

2018-12-10 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi Eric, Thanks for working on this! Comment at: include/clang/Basic/Builtins.def:759 +// Random C++ builtins. +LANGBUILTIN(__builtin_is_constant_evaluated, "b", "ncu", CXX_LANG) + Name bikeshedding : perhaps the builtin name could be de

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-12-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D53738#1320936 , @rjmccall wrote: > Okay, thanks, that makes sense to me. > > I'll ask around to find a way to contact the C committee. @rjmccall Any updates on this? If we aren't able to find a way to contact anyone affi

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D55508#1325834 , @MyDeveloperDay wrote: > In D55508#1325758 , @JonasToth wrote: > > > LGTM. Do you have commit access? > > > I do not I'm afraid I will commit for you. CHANGES SINC

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348793: [clang-tidy] insert release notes for new checkers alphabetically (authored by JonasToth, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[clang-tools-extra] r348793 - [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Mon Dec 10 11:41:53 2018 New Revision: 348793 URL: http://llvm.org/viewvc/llvm-project?rev=348793&view=rev Log: [clang-tidy] insert release notes for new checkers alphabetically Summary: Almost all code review comments on new checkers {D55433} {D48866} {D54349} seem to a

[PATCH] D55488: Add utility for dumping a label with child nodes

2018-12-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:115 + template + void addChild(const std::string &label, Fn doAddChild) { +if (label.empty()) label -> Label doAddChild -> DoAddChild Comment at: include

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. By the word, will be good idea to have script which check alphabetical order and use it during build. Sometimes alphabetical order may be violated after merge with trunk. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55508/new/ ht

[PATCH] D55508: [clang-tidy] insert release notes for new checkers alphabetically

2018-12-10 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D55508#1325960 , @Eugene.Zelenko wrote: > By the word, will be good idea to have script which check alphabetical order > and use it during build. Sometimes alphabetical order may be violated after > merge with trunk. I th

[PATCH] D54489: Implement -frecord-command-line (-frecord-gcc-switches)

2018-12-10 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. There may be changes to some details in the LLVM patch; once they are finalized I will update the Clang patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54489/new/ https://reviews.llvm.org/D54489 ___ cfe-c

[PATCH] D55527: Normalize GlobalDecls when used with CPUDispatch

2018-12-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rsmith, aaron.ballman. Previously, CPUDispatch functionality did some wacky things with GlobalDecls, which resulted in multiple GlobalDecls having the same mangled name. This patch corrects this in a few ways: First, it Moves the emiss

  1   2   >