[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

[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] 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

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] 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] = { +

[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 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] 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: > > >

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] 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

[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 -

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] 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

[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

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

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

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

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

[PATCH] 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] 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] 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

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] 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

[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 __

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] 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.

[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] 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

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] 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

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] 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

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

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

[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

[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] 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] 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] 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

<    1   2