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

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

[PATCH] D37189: Fix an assertion failure that occured when custom 'operator new[]' return non-ElementRegion and 'c++-allocator-inlining' sets true.

2017-12-08 Thread Henry Wong via Phabricator via cfe-commits
MTC marked an inline comment as done. MTC added a comment. Thank you for your constant attention to this problem, Artem. I've updated the diff. As you said, this is a complex problem and look forward to your work on this issue. Repository: rC Clang https://reviews.llvm.org/D37189 ___

[PATCH] D37189: Fix an assertion failure that occured when custom 'operator new[]' return non-ElementRegion and 'c++-allocator-inlining' sets true.

2017-12-08 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 126262. MTC set the repository for this revision to rC Clang. MTC added a comment. Herald added a subscriber: cfe-commits. Use 'return State' instead of 'return nullptr'. Repository: rC Clang https://reviews.llvm.org/D37189 Files: lib/StaticAnalyzer/Checke

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

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

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

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

r320239 - Revert r320230 to fix buildbots.

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

r320238 - Fix Driver/darwin-version.c test

2017-12-08 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Dec 8 18:56:48 2017 New Revision: 320238 URL: http://llvm.org/viewvc/llvm-project?rev=320238&view=rev Log: Fix Driver/darwin-version.c test A target argument should be provided to avoid failures on non-Darwin Modified: cfe/trunk/test/Driver/darwin-version.c Modif

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

2017-12-08 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 updated this revision to Diff 126258. kkwli0 added a comment. Using a mock CUDA installation works too. https://reviews.llvm.org/D40996 Files: test/Driver/unknown-std.cpp Index: test/Driver/unknown-std.cpp === --- test/D

r320235 - [driver][darwin] Refactor the target selection code, NFC

2017-12-08 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Dec 8 18:27:11 2017 New Revision: 320235 URL: http://llvm.org/viewvc/llvm-project?rev=320235&view=rev Log: [driver][darwin] Refactor the target selection code, NFC The simulator variant of Darwin's platforms is removed in favor of a new environment field. The code that

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

2017-12-08 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320235: [driver][darwin] Refactor the target selection code, NFC (authored by arphaman). Repository: rC Clang https://reviews.llvm.org/D41035 Files: lib/Driver/ToolChains/Darwin.cpp lib/Driver/Too

r320233 - Fix fsanitize-blacklist test on Windows.

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

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

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

[PATCH] D40936: Hardware-assisted AddressSanitizer (clang part).

2017-12-08 Thread Evgenii Stepanov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320232: Hardware-assisted AddressSanitizer (clang part). (authored by eugenis). Changed prior to commit: https://reviews.llvm.org/D40936?vs=126060&id=126252#toc Repository: rL LLVM https://reviews.l

[PATCH] D40936: Hardware-assisted AddressSanitizer (clang part).

2017-12-08 Thread Evgenii Stepanov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320232: Hardware-assisted AddressSanitizer (clang part). (authored by eugenis). Changed prior to commit: https://reviews.llvm.org/D40936?vs=126060&id=126251#toc Repository: rC Clang https://reviews.

r320232 - Hardware-assisted AddressSanitizer (clang part).

2017-12-08 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Dec 8 17:32:07 2017 New Revision: 320232 URL: http://llvm.org/viewvc/llvm-project?rev=320232&view=rev Log: Hardware-assisted AddressSanitizer (clang part). Summary: Driver, frontend and LLVM codegen for HWASan. A clone of ASan, basically. Reviewers: kcc, pcc, alekseysh

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

2017-12-08 Thread Wolfgang Pieb via Phabricator via cfe-commits
wolfgangp added a comment. A quick note on usage: Compile your source with "clang -O2 -g -c -fextend-lifetimes foo.cpp" to see the effects (or use -fextend-this-ptr if you just want to extend the lifetime of 'this'). https://reviews.llvm.org/D41044 __

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

2017-12-08 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. LGTM. Repository: rC Clang https://reviews.llvm.org/D41035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r320230 - [ODRHash] Support ODR violation detection in functions.

2017-12-08 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Dec 8 17:29:40 2017 New Revision: 320230 URL: http://llvm.org/viewvc/llvm-project?rev=320230&view=rev Log: [ODRHash] Support ODR violation detection in functions. Extend the hashing to functions, which allows detection of function definition mismatches across modules. M

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

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

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

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

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

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

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

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

r320220 - Don't link NetBSD programs with -ldl in linkXRayRuntimeDeps

2017-12-08 Thread Kamil Rytarowski via cfe-commits
Author: kamil Date: Fri Dec 8 16:34:01 2017 New Revision: 320220 URL: http://llvm.org/viewvc/llvm-project?rev=320220&view=rev Log: Don't link NetBSD programs with -ldl in linkXRayRuntimeDeps Summary: There is no such library on NetBSD, the corresponding functions like dlopen(3) are in libc. Sp

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

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

[PATCH] D40112: [CodeGen][X86] Fix handling of __fp16 vectors

2017-12-08 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320215: [CodeGen][X86] Fix handling of __fp16 vectors. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D40112?vs=123100&id=126229#toc Repository: rL LLVM https://reviews.ll

[PATCH] D40112: [CodeGen][X86] Fix handling of __fp16 vectors

2017-12-08 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320215: [CodeGen][X86] Fix handling of __fp16 vectors. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D40112?vs=123100&id=126228#toc Repository: rC Clang https://reviews.l

r320215 - [CodeGen][X86] Fix handling of __fp16 vectors.

2017-12-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Dec 8 16:02:37 2017 New Revision: 320215 URL: http://llvm.org/viewvc/llvm-project?rev=320215&view=rev Log: [CodeGen][X86] Fix handling of __fp16 vectors. This commit fixes a bug in IRGen where it generates completely broken code for __fp16 vectors on X86. For example w

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

2017-12-08 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. The title says "Add cc1 option..." which to me implies a "cc1 only" option. What you're actually doing is adding a driver option. Please update the title. Comment at: test/Driver/stack-size-section.c:2 +// RUN: %clang -target x86_64-unknown %s -S -

[PATCH] D41039: Add support for attribute "trivial_abi"

2017-12-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. Herald added a subscriber: javed.absar. This patch adds support for a new attribute "trivial_abi", which will be used to instruct clang to pass and return non-trivial C++ structs directly when it's possible to do so. The original RFC I sent to cfe-dev last month i

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

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

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

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

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

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

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

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

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

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

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

2017-12-08 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. This seems correct to me. I wouldn't mind having someone else back me up though. Also, I have a suggestion for a `static_assert`. Comment at: lib/Driver/ToolChains/Darwin.cpp:1334-1339 + const char *EnvVars[Darwin::LastDarwinPlatform + 1] = { +

r320211 - Unify implementation of our two different flavours of -Wtautological-compare,

2017-12-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Dec 8 14:57:11 2017 New Revision: 320211 URL: http://llvm.org/viewvc/llvm-project?rev=320211&view=rev Log: Unify implementation of our two different flavours of -Wtautological-compare, and fold together into a single function. In so doing, fix a handful of remaining bugs

[PATCH] D40901: Refactor lazy loading of template specializations. NFC

2017-12-08 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: lib/AST/DeclTemplate.cpp:188-189 + // redeclarations of this template. + // + // FIXME: Avoid walking the entire redeclaration chain here. + CommonBase *C

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

2017-12-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Preparation refactoring patch: https://reviews.llvm.org/D41035 Repository: rC Clang https://reviews.llvm.org/D40998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

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

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

r320207 - [Lex] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).

2017-12-08 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Fri Dec 8 14:39:26 2017 New Revision: 320207 URL: http://llvm.org/viewvc/llvm-project?rev=320207&view=rev Log: [Lex] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). Modified: cfe/trunk/include/clang/Lex/Lexer.h cfe/tr

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

2017-12-08 Thread Richard Smith via cfe-commits
Selfhost failures are ultimately caused by: https://github.com/llvm-mirror/llvm/blob/master/utils/TableGen/X86RecognizableInstr.cpp#L709 https://github.com/llvm-mirror/clang/blob/master/include/clang/AST/OperationKinds.h#L26 These are genuine bugs: assigning -1 into an enumeration with no negativ

[PATCH] D41032: [CodeGen] Implement _InterlockedCompareExchange128 intrinsic

2017-12-08 Thread Colden Cullen via Phabricator via cfe-commits
colden created this revision. InterlockedCompareExchange128 is a bit more complicated than the other InterlockedCompareExchange functions, so it requires a bit more work. It doesn't directly refer to 128bit ints, instead it takes pointers to 64bit ints for Destination and ComparandResult, and e

[PATCH] D39430: [clangd] various fixes

2017-12-08 Thread Raoul Wols via Phabricator via cfe-commits
rwols added a comment. This differential is now split into https://reviews.llvm.org/D41031 and https://reviews.llvm.org/D40860. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D39430 ___ cfe-commits mailing list cfe-commits@lists.llv

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[PATCH] D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The "enforcement" listed on the C++ Core Guidelines is very unhelpful, so it might be worth bringing it up as an issue on their bug tracker. ES.100 basically says "you know what we mean, wink wink" as enforcement and doesn't give any guidance as to what is safe or

[PATCH] D41030: [libcxx] [test] Fix MSVC warnings, null pointer deref.

2017-12-08 Thread Stephan T. Lavavej via Phabricator via cfe-commits
STL_MSFT created this revision. [libcxx] [test] Fix MSVC warnings, null pointer deref. test/std/algorithms/alg.modifying.operations/alg.generate/generate_n.pass.cpp Silence MSVC warning C4244. This is expected when passing floating-point values for size. test/std/utilities/template.bitset/bitset

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

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

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

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

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

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceUncaughtExceptionCheck.cpp:59 + if (!BeginLoc.isMacroID()) { +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s");

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

2017-12-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rC Clang https://reviews.llvm.org/D41016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r320191 - [OPENMP] Simplify codegen for loop iteration variables in loop preamble.

2017-12-08 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Dec 8 12:18:58 2017 New Revision: 320191 URL: http://llvm.org/viewvc/llvm-project?rev=320191&view=rev Log: [OPENMP] Simplify codegen for loop iteration variables in loop preamble. Initial patch could cause trouble in the optimized code because of the incorrectly generat

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

2017-12-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:833 + // Arrays don't have pass_object_size attributes, but if they have a constant + // size modifier it's the array size (C99 6.5.7.2p1). + if (auto *DecayedArrayTy = dyn_cast(ParamDecl->getType())) -

[PATCH] D36918: [Sema] Take into account the current context when checking the accessibility of a member function pointer

2017-12-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D36918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36915: [Sema] Diagnose local variables and parameters captured by lambda and block expressions in a default argument

2017-12-08 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D36915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-12-08 Thread Richard Trieu via cfe-commits
Vassil, It depends on which parts of the AST you want to be stable. The ODRHashing is stable across TU's, but it may depend on information that you don't want to be part of the hash. For instance, if you have "using F = float;" in you code, then the hash of TemplateArgument for "float" and for "

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

2017-12-08 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. > That said, one of the upsides of the current ubsan is that whether it will > produce a diagnostic is predictable (as long as you don't use uninitialized > data); you lose that to some extent with llvm.objectsize because it depends > on the optimizer. True.

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

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

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

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

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

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

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

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

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

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

[PATCH] D40685: [libunwind] Switch to add_llvm_install_targets

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

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

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

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

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

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

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

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

2017-12-08 Thread Hans Wennborg via cfe-commits
On Fri, Dec 8, 2017 at 9:30 AM, Richard Smith via cfe-commits wrote: > On 8 Dec 2017 08:54, "Hans Wennborg via cfe-commits" > wrote: > > Author: hans > Date: Fri Dec 8 08:54:08 2017 > New Revision: 320162 > > URL: http://llvm.org/viewvc/llvm-project?rev=320162&view=rev > Log: > Revert "Unify imp

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

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

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

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

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

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

r320168 - [hwasan] typo in docs

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

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

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

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

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

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

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

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

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

r320165 - Fix a comment in the code

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

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

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

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

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

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

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

[PATCH] D40685: [libunwind] Switch to add_llvm_install_targets

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >