[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D42966#1083954, @mikhail.ramalho wrote: > Hi, > > > After thinking about this a bit, and use cases like rename and > > find-declaration that could be USR based, I think including some location > > information is the right way to go, which

[PATCH] D46286: [Driver] Don't warn about unused inputs in config files

2018-05-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. Indeed, this is a missing case. Thank you for fixing it! LGTM Repository: rC Clang https://reviews.llvm.org/D46286 ___ cfe-commits

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-doc/Index.h:28 +// Abstract class representing an index of mapped info objects. +class Index { +public: What is this interface for? It looks like none of the functions are ever called through the interface. If

?????? If I want to disable certain attributes, such as "swiftcall", isthere any way to do it now?

2018-05-02 Thread ???? via cfe-commits
Thanks. If I remove some specific attributes, now I can think of the following method.First of all, let me talk about my method. 1.Define target platforms that do not support attributes.such as def TargetPower : TargetArch<["ppc", "ppc64", "ppc64le"]>; 2.Define TargetNotSupportedAttr

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-05-02 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D46190#1083502, @rsmith wrote: > This is already the correct outcome. Both typedefs are referenced; this is > correct because they are named by the source code. Neither typedef is marked > as "used"; this is correct because a

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-05-02 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 144842. szepet marked an inline comment as done. szepet added a comment. Yepp, good point, Aleksei, rewritten the tests using explicit instantiation. https://reviews.llvm.org/D38845 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp

[PATCH] D45932: [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with raw literals

2018-05-02 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: test/clang-tidy/modernize-raw-string-literal.cpp:42 char const *const HexNonPrintable("\\\x03"); char const *const Delete("\\\177"); +char const *const MultibyteSnowman("\xE2\x98\x83"); zinovy.nis wrote: > By the way,

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. ping... @xazax.hun could you please help me with the commit? Repository: rC Clang https://reviews.llvm.org/D46019 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. LGTM! Comment at: unittests/AST/ASTImporterTest.cpp:1505 ::testing::Values(ArgVector(), ArgVector{"-fdelayed-template-parsing"}),); +const internal::VariadicDynCastAllOfMatcher +

[PATCH] D46353: [ASTImporter] Extend lookup logic in class templates

2018-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a.sidorin, xazax.hun, szepet. Herald added subscribers: cfe-commits, dkrupp, rnkovacs. During import of a class template, lookup may find a forward declaration and structural match falsely reports equivalency in between a fwd decl and a

[PATCH] D46353: [ASTImporter] Extend lookup logic in class templates

2018-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > During import of a class template, lookup may find a forward declaration and > structural match falsely reports equivalency in between a fwd decl and a > definition. This can happen when the class to be imported does not have any data members. Structural equivalency

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-05-02 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:1532 +dependentNameType; +TEST(ImportExpr, DependentNameType) { + MatchVerifier Verifier; Perhaps a newline before would make it more independent from the Matcher, as you did it

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-05-02 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I see. Thank you for fixing + explaining :) Am 30.04.2018 um 23:39 schrieb Shuai Wang via Phabricator: > shuaiwang added a comment. > >> Why do you think that looping is required? From my understanding, we >> >> need the first usage (DeclRefExpr) to get the

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-02 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. I believe this was accepted by rnk - are you waiting for specific further feedback? https://reviews.llvm.org/D36610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46286: [Driver] Don't warn about unused inputs in config files

2018-05-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 144839. mstorsjo added a comment. In order not to break test/Driver/cl-pch.cpp (I hadn't run the full testsuite for this change before submitting the patch), I had to do another tweak, in order not to claim any input argument after `--`. Does it still

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Format/Format.cpp:1691 // 0. Otherwise, returns the priority of the matching category or INT_MAX. - int getIncludePriority(StringRef IncludeName, bool CheckMainHeader) { + int getIncludePriority(StringRef IncludeName,

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > This is really a corner cases that users might not need to know about. But an > example is: > Code: "#include " (without \n at the end). After inserting , #include > \n#include \n (this is good). However, if you insert another , the > code would become

[PATCH] D44143: [clang-tidy] Create properly seeded random generator check

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is getting closer, but it seems there are still unresolved comments from reviewers. Are you planning to resolve those as well? https://reviews.llvm.org/D44143 ___ cfe-commits mailing list

r331344 - [ASTImporter] Fix isa cast assert

2018-05-02 Thread Peter Szecsi via cfe-commits
Author: szepet Date: Wed May 2 04:52:54 2018 New Revision: 331344 URL: http://llvm.org/viewvc/llvm-project?rev=331344=rev Log: [ASTImporter] Fix isa cast assert Do early return if we can't import the found decl for a member expr. This follows the pre-existing scheme, e.g with

[PATCH] D46019: [ASTImporter] Fix isa cast assert

2018-05-02 Thread Peter Szecsi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331344: [ASTImporter] Fix isa cast assert (authored by szepet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46019 Files:

r331345 - [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.

2018-05-02 Thread Henry Wong via cfe-commits
Author: henrywong Date: Wed May 2 05:11:22 2018 New Revision: 331345 URL: http://llvm.org/viewvc/llvm-project?rev=331345=rev Log: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize. Summary: Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero, VLASize to be able to

[PATCH] D46007: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize.

2018-05-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331345: [analyzer] Add `TaintBugVisitor` to the ArrayBoundV2, DivideZero and VLASize. (authored by henrywong, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D46176: Pull helper class Environment from clangFormat into libToolingCore [NFC]

2018-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: include/clang/Tooling/Core/Environment.h:1 +//===--- Environment.h - Sourece tooling environment --*- C++ -*---===// +// I'm not sure about this abstraction - I can't tell what it represents, and what in

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-05-02 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. Sorry for the long delay, I have just finished my holiday. Thanks a lot for the review, I will fix the typo in next update. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2100 +std::tie(StateNullChar, StateNonNullChar) = +

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Have you run this over any large code bases to see whether the check triggers > in practice? I'm still curious about this, btw. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:45 + anyOf(TypesMatcher,

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-02 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:45 + anyOf(TypesMatcher, pointerType(pointee(TypesMatcher)), + callee(namedDecl(hasName("data" + .bind("call",

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-02 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added subscribers: rsmith, rnk. mikhail.ramalho added a comment. Last review asked to change the test case, I just want to make sure everything is fine this time. https://reviews.llvm.org/D36610 ___ cfe-commits mailing list

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Hi, > Filename + offset for things like function parameters, where we have to > identify the particular function declaration they're part of. > For static functions themselveds, just the filename. I think this is > current behavior in both cases. But then

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantDataCallCheck.cpp:31 +void RedundantDataCallCheck::registerMatchers(MatchFinder *Finder) { + using namespace ast_matchers; + No need to register any of these matchers unless in C++

[PATCH] D46190: For an ODR declaration, set the 'Used' bit on its associated declarations.

2018-05-02 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D46190#1083502, @rsmith wrote: > Let's look at your original example again (I've cleaned it up and extended it > a bit, but hopefully this matches your intent): > > namespace nsp { > int var1, var2; > } > > using

Re: [PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-02 Thread Mikhail Ramalho via cfe-commits
Last review asked to change the test case, I just want to make sure everything is fine this time. 2018-05-02 8:54 GMT+01:00 Manuel Klimek via Phabricator < revi...@reviews.llvm.org>: > klimek added a comment. > > I believe this was accepted by rnk - are you waiting for specific further >

Re: [PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via cfe-commits
Hi, > Filename + offset for things like function parameters, where we have to > identify the particular function declaration they're part of. > For static functions themselveds, just the filename. I think this is > current behavior in both cases. > > But then we're back to the initial question,

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:265-276 + const llvm::APSInt = i->From(), = i->To(); + const llvm::APSInt = (to.isMinSignedValue() ? + BV.getMaxValue(to) : +

[PATCH] D32904: [Analyzer] Iterator Checker - Part 8: Support for assign, clear, insert, emplace and erase operations

2018-05-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144878. baloghadamsoftware added a comment. Herald added a reviewer: george.karpenkov. Rebased. https://reviews.llvm.org/D32904 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx.h

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D42966#1085257, @mikhail.ramalho wrote: > Should we ignore linemarkers and use filename + offset of the real file? I would say "yes". Let's not rely on linemarkers, unless we can explain why that's a good idea. > Should we try to

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Hi, > I would say "yes". Let's not rely on linemarkers, unless we can explain > why that's a good idea. Sounds reasonable to me, specially considering cases like rename and find-declaration. > Where do virtual files come from in the first place? From the

r331358 - [OPENMP] Emit names of the globals depending on target.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 07:20:50 2018 New Revision: 331358 URL: http://llvm.org/viewvc/llvm-project?rev=331358=rev Log: [OPENMP] Emit names of the globals depending on target. Some symbols are not allowed to be used as names on some targets. Patch ries to unify the emission of the names

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-05-02 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Thanks @NoQ for taking the time to review my code! I'm sorry that the patch became this long. It was an error on my part, and I completely get that the checker now takes an uncomfortably long time to read and understand. This is my first "bigger" project in the CSA,

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 144885. Anastasia added a comment. The best way of adding common helper function I could come up with. The problem is that string literals are created quite differently all over: using various char types and const qualifiers. That seems to cover the most

r331361 - [analyzer] Fix filename in cross-file HTML report

2018-05-02 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Wed May 2 07:26:12 2018 New Revision: 331361 URL: http://llvm.org/viewvc/llvm-project?rev=331361=rev Log: [analyzer] Fix filename in cross-file HTML report Summary: The filename is currently taken from the start of the path, while the line and column are taken from

[PATCH] D45611: [analyzer] Fix filename in cross-file HTML report

2018-05-02 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331361: [analyzer] Fix filename in cross-file HTML report (authored by malcolm.parsons, committed by ). Changed prior to commit: https://reviews.llvm.org/D45611?vs=144742=144881#toc Repository: rC

[PATCH] D45611: [analyzer] Fix filename in cross-file HTML report

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks! I noticed the problem but never investigated it. Repository: rC Clang https://reviews.llvm.org/D45611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D46049#1081196, @yaxunl wrote: > Can you add a codegen test for 1.2, 2.0? Anything specific you would like me to check? I am not modifying anything in CodeGen here though. > Also, I am wondering whether this is valid for OpenCL C++. Do

r331365 - [OPENMP] Support C++ member functions in the device constructs.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 08:45:28 2018 New Revision: 331365 URL: http://llvm.org/viewvc/llvm-project?rev=331365=rev Log: [OPENMP] Support C++ member functions in the device constructs. Added correct emission of the C++ member functions for the device function when they are used in the

[libclc] r331366 - clc_sqrt: Reuse unary_decl.inc

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 09:06:52 2018 New Revision: 331366 URL: http://llvm.org/viewvc/llvm-project?rev=331366=rev Log: clc_sqrt: Reuse unary_decl.inc Signed-off-by: Jan Vesely Reviewed-by: Aaron Watry Tested-by: Aaron Watry

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. Do you want the flag to be renamed? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 144892. Anastasia added a comment. Added accidentally removed code and improved the test. https://reviews.llvm.org/D46049 Files: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/AST/Expr.cpp lib/Sema/SemaExpr.cpp

r331389 - [Driver] Obey computed sysroot when finding libc++ headers.

2018-05-02 Thread Dan Albert via cfe-commits
Author: danalbert Date: Wed May 2 12:31:01 2018 New Revision: 331389 URL: http://llvm.org/viewvc/llvm-project?rev=331389=rev Log: [Driver] Obey computed sysroot when finding libc++ headers. Summary: A handful of targets will try some default paths if --sysroot is not provided. If that is the

r331392 - Revert "Emit an error when mixing and "

2018-05-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed May 2 12:52:07 2018 New Revision: 331392 URL: http://llvm.org/viewvc/llvm-project?rev=331392=rev Log: Revert "Emit an error when mixing and " It reverts r331378 as it caused test failures ThreadSanitizer-x86_64 :: Darwin/gcd-groups-destructor.mm

r331393 - [OPENMP] Add support for reductions on simd directives in target

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 13:03:27 2018 New Revision: 331393 URL: http://llvm.org/viewvc/llvm-project?rev=331393=rev Log: [OPENMP] Add support for reductions on simd directives in target regions. Added codegen for `simd reduction()` constructs in target directives. Modified:

r331401 - [analyzer] Revert r331096 "CStringChecker: Add support for BSD strlcpy()...".

2018-05-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed May 2 13:33:17 2018 New Revision: 331401 URL: http://llvm.org/viewvc/llvm-project?rev=331401=rev Log: [analyzer] Revert r331096 "CStringChecker: Add support for BSD strlcpy()...". The return values of the newly supported functions were not handled correctly:

[PATCH] D26054: Use `getFileLoc()` instead of `getSpellingLoc()` in the ASTImporter

2018-05-02 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. Herald added a subscriber: martong. I encountered an issue caused by this change. In the scenario as shown below the call to getFileLoc causes the startLoc of the BinaryOp to be after the endLoc, because the LHS (`s->a`) is located in the marco argument while the RHS

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1085400, @pfultz2 wrote: > Do you want the flag to be renamed? I personally would //like// a bit better name, but i'm not sure what would be better, so not a requirement. Do you have some better choices? Repository: rCTE

r331372 - [OPENMP] Enable c++ exceptions outside of the target constructs iff they are

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 09:52:07 2018 New Revision: 331372 URL: http://llvm.org/viewvc/llvm-project?rev=331372=rev Log: [OPENMP] Enable c++ exceptions outside of the target constructs iff they are enabled for the host. If the compilation for the host enables C++ exceptions, but they are

[PATCH] D46022: [OpenCL] Restrict various keywords in OpenCL C++ mode

2018-05-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks! https://reviews.llvm.org/D46022 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r331377 - [OPENMP] Do not emit warning for implicitly declared target functions.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 10:39:00 2018 New Revision: 331377 URL: http://llvm.org/viewvc/llvm-project?rev=331377=rev Log: [OPENMP] Do not emit warning for implicitly declared target functions. Since upcoming OpenMP 5.0 functions can be mapped implicitly as declare target and we should not

[PATCH] D46328: [X86] Mark all x86 specific builtins as nothrow.

2018-05-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. We don't expect user code to call these builtins directly anyway, so probably not useful to test. Repository: rC Clang https://reviews.llvm.org/D46328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-05-02 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 144908. modocache added a comment. Thanks for the review, @GorNishanov. Here's a more correct solution: an i1 is used to keep track of whether await_resume threw. If it did, the coroutine body is skipped, and we go straight to the final suspend point.

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: kubamracek. https://reviews.llvm.org/D46363 Files: compiler-rt/test/tsan/Darwin/gcd-groups-destructor.mm compiler-rt/test/tsan/Darwin/libcxx-shared-ptr-stress.mm compiler-rt/test/tsan/Darwin/xpc-race.mm Index:

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Link to corresponding review that introduced the change is https://reviews.llvm.org/D45470 Another option is to use `` and `std::atomic` but that will be functionality change. I'd rather avoid that. https://reviews.llvm.org/D46363

r331390 - [Driver] Infer Android sysroot location.

2018-05-02 Thread Dan Albert via cfe-commits
Author: danalbert Date: Wed May 2 12:38:37 2018 New Revision: 331390 URL: http://llvm.org/viewvc/llvm-project?rev=331390=rev Log: [Driver] Infer Android sysroot location. Summary: Android toolchains include their headers and libraries in a self-contained directory within the toolchain.

[PATCH] D45291: [Driver] Infer Android sysroot location.

2018-05-02 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331390: [Driver] Infer Android sysroot location. (authored by danalbert, committed by ). Changed prior to commit: https://reviews.llvm.org/D45291?vs=141067=144916#toc Repository: rC Clang

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-02 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek accepted this revision. kubamracek added a comment. This revision is now accepted and ready to land. https://reviews.llvm.org/D46363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45292: [Driver] Obey computed sysroot when finding libc++ headers.

2018-05-02 Thread Dan Albert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331389: [Driver] Obey computed sysroot when finding libc++ headers. (authored by danalbert, committed by ). Changed prior to commit: https://reviews.llvm.org/D45292?vs=141069=144915#toc Repository:

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D46159#1085548, @pfultz2 wrote: > > Do you have some better choices? > > I could do `-allow-alpha-checks`. What do you think? That seems reasonable to me. Although I like `-allow-enabling-alpha-checks` better because it is longer and will

[PATCH] D45470: Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331378: Emit an error when mixing stdatomic.h and atomic (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D45470?vs=143817=144903#toc Repository: rC Clang

[PATCH] D46317: [clang-tidy] New check bugprone-map-subscript-operator-lookup

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I am generally in favor of this but would be curious to see how the check reacts to real world code bases. Facebook's usage experience is compelling, but I'm also wondering how bad the false-positive rate is on existing code. Can you try running the check over

[PATCH] D46361: [CMake][Cache] Stop pretending that Fuchsia is UNIX

2018-05-02 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. fnu lgtm Repository: rC Clang https://reviews.llvm.org/D46361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > Do you have some better choices? I could do `-allow-alpha-checks`. What do you think? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1691 // 0. Otherwise, returns the priority of the matching category or INT_MAX. - int getIncludePriority(StringRef IncludeName, bool CheckMainHeader) { + int getIncludePriority(StringRef IncludeName, bool

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 144895. ioeric marked 3 inline comments as done. ioeric added a comment. - addressed more review comments. Repository: rC Clang https://reviews.llvm.org/D46180 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index:

Re: [PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-05-02 Thread Mikhail Ramalho via cfe-commits
Hi, > I would say "yes". Let's not rely on linemarkers, unless we can explain > why that's a good idea. > > Sounds reasonable to me, specially considering cases like rename and find-declaration. > > Where do virtual files come from in the first place? > > >From the linemarker:

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1403 + if (auto *IL = dyn_cast_or_null(Init)) { +if (InitTy->isConstantArrayType()) { + for (auto I : IL->inits()) Do you actually care if it's an array initialization instead

[PATCH] D46361: [CMake][Cache] Stop pretending that Fuchsia is UNIX

2018-05-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: mcgrathr. Herald added subscribers: cfe-commits, mgorny. This changes some aspects of the build that are not relevant or useful for Fuchsia like setting the RPATH/RUNPATH. Repository: rC Clang https://reviews.llvm.org/D46361 Files:

[libcxx] r331379 - Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed May 2 10:56:45 2018 New Revision: 331379 URL: http://llvm.org/viewvc/llvm-project?rev=331379=rev Log: Emit an error when mixing and Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:42 + const auto Memoized = Results.find(Exp); + if (Memoized != Results.end()) { +return Memoized->second; Can elide the braces. Comment at:

Re: If I want to disable certain attributes, such as "swiftcall", isthere any way to do it now?

2018-05-02 Thread Aaron Ballman via cfe-commits
On Wed, May 2, 2018 at 4:59 AM, 朴素 <772847...@qq.com> wrote: > Thanks. > > If I remove some specific attributes, now I can think of the following > method.First of all, let me talk about my method. > > 1.Define target platforms that do not support attributes.such as def > TargetPower :

r331370 - Add -foutline option to enable the MachineOutliner in AArch64

2018-05-02 Thread Jessica Paquette via cfe-commits
Author: paquette Date: Wed May 2 09:42:51 2018 New Revision: 331370 URL: http://llvm.org/viewvc/llvm-project?rev=331370=rev Log: Add -foutline option to enable the MachineOutliner in AArch64 Since we've been working on productizing the MachineOutliner in AArch64, it makes sense to provide a

r331378 - Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed May 2 10:50:43 2018 New Revision: 331378 URL: http://llvm.org/viewvc/llvm-project?rev=331378=rev Log: Emit an error when mixing and Atomics in C and C++ are incompatible at the moment and mixing the headers can result in confusing error messages. Emit an error

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 3 inline comments as done. sepavloff added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1414 + return true; +} + } rjmccall wrote: > You should check the array fill expression here; for now, the test case would > be

[PATCH] D46328: [X86] Mark all x86 specific builtins as nothrow.

2018-05-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Is this ok to go in then? Repository: rC Clang https://reviews.llvm.org/D46328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46328: [X86] Mark all x86 specific builtins as nothrow.

2018-05-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r331385 - [OPENMP] Analyze the type of the mapped entity instead of its base.

2018-05-02 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed May 2 11:44:10 2018 New Revision: 331385 URL: http://llvm.org/viewvc/llvm-project?rev=331385=rev Log: [OPENMP] Analyze the type of the mapped entity instead of its base. If the mapped entity is a data member, we erroneously checked the type of its base rather than the

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D46049#1085388, @Anastasia wrote: > In https://reviews.llvm.org/D46049#1081196, @yaxunl wrote: > > > Can you add a codegen test for 1.2, 2.0? > > > Anything specific you would like me to check? I am not modifying anything in > CodeGen here

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 144898. sepavloff added a comment. Addressed review notes. Repository: rC Clang https://reviews.llvm.org/D46241 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/cxx11-initializer-aggregate.cpp Index:

[PATCH] D43750: Allow writing calling convention attributes on function types

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping x4 https://reviews.llvm.org/D43750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45470: Emit an error when mixing and

2018-05-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the review, Marshall. In the end I removed `XFAIL: with_system_cxx_lib` from libc++ test as the change is header-only at compile time. Library behaviour at runtime shouldn't be affected. Repository: rC Clang https://reviews.llvm.org/D45470

[PATCH] D45944: Disallow pointers to const in __sync_fetch_and_xxx

2018-05-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping https://reviews.llvm.org/D45944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45149: MallocChecker, adding specific BSD calls

2018-05-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. In https://reviews.llvm.org/D45149#1062279, @jdenny wrote: > Hi David. While I did make some superficial changes here recently, I'm no > authority on what belongs here. However, I would suggest that the > refactoring patch be split from the original patch. Thanks.

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 144981. devnexen added a comment. New test to check the length https://reviews.llvm.org/D45177 Files: lib/StaticAnalyzer/Checkers/CStringChecker.cpp test/Analysis/bsd-string.c Index: test/Analysis/bsd-string.c

?????? If I want to disable certain attributes, such as "swiftcall",isthere any way to do it now?

2018-05-02 Thread ???? via cfe-commits
hi, Aaron The reason why i not use of TargetSpecificAttr is as follows.If I plan to support a new platform, I don't want to let users use certain attributes because of hardware or simply not want to. Yes, we can use TargetSpecificAttr, but if we use TargetSpecificAttr that we need to

[libclc] r331434 - remquo: Port from amd builtins

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 22:44:26 2018 New Revision: 331434 URL: http://llvm.org/viewvc/llvm-project?rev=331434=rev Log: remquo: Port from amd builtins double version passes on carrizo. float version fails on denormals. Signed-off-by: Jan Vesely Reviewer: Aaron

[libclc] r331433 - math: Add helper function to flush denormals if not supported.

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 22:44:22 2018 New Revision: 331433 URL: http://llvm.org/viewvc/llvm-project?rev=331433=rev Log: math: Add helper function to flush denormals if not supported. Signed-off-by: Jan Vesely Reviewer: Aaron Watry Modified:

[libclc] r331435 - remquo: Flush denormals if not supported

2018-05-02 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed May 2 22:44:28 2018 New Revision: 331435 URL: http://llvm.org/viewvc/llvm-project?rev=331435=rev Log: remquo: Flush denormals if not supported It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1085684, @dcoughlin wrote: > In https://reviews.llvm.org/D46159#1085548, @pfultz2 wrote: > > > > Do you have some better choices? > > > > I could do `-allow-alpha-checks`. What do you think? > > > That seems reasonable to me. >

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. Sure ! looking into it. Repository: rC Clang https://reviews.llvm.org/D45177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ reopened this revision. NoQ added a comment. This revision is now accepted and ready to land. I reverted this for now. I'm sorry - i would have looked into this myself, but unfortunately there are other important fixes that distract me at the moment. Repository: rC Clang

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-05-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Can you split this patch up a bit? There's changes here for the `<=>` rewriting, but also for supporting `operator<=>(...) = default`, and some constant evaluation and code generation changes too. It's a lot easier to review more directed, smaller patches.

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:265-276 + const llvm::APSInt = i->From(), = i->To(); + const llvm::APSInt = (to.isMinSignedValue() ? + BV.getMaxValue(to) : +

  1   2   >