[PATCH] D37437: [analyzer] Fix some checker's output plist not containing the checker name

2017-10-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Looks like the need to have the checker name in BugType along with the checker names not being initialized early enough, leads to worse checker-writer experience. Is there a way to ensure that the checker names are set at construction? Comment at:

[PATCH] D38903: [ubsan] Only use indirect RTTI in prologues on Darwin

2017-10-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk abandoned this revision. vsk added a comment. https://reviews.llvm.org/D38913 should make this unnecessary. https://reviews.llvm.org/D38903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 6:33 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 6:12 PM, Vedant Kumar > wrote: > >> On Oct 13, 2017, at 6:05 PM, Peter Collingbourne > > wrote: >> >> >> >> On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kuma

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() arichardson wrote: > yaxunl wrote: > > arich

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 6:12 PM, Vedant Kumar wrote: > > On Oct 13, 2017, at 6:05 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kumar wrote: > >> >> On Oct 13, 2017, at 4:33 PM, Peter Collingbourne wrote: >> >> >> >> On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kuma

r315787 - [Sema] Warn about unused variables if we can constant evaluate the initializer.

2017-10-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 13 18:30:49 2017 New Revision: 315787 URL: http://llvm.org/viewvc/llvm-project?rev=315787&view=rev Log: [Sema] Warn about unused variables if we can constant evaluate the initializer. If the variable construction can be constant evaluated it doesn't have side effects, so

[PATCH] D38678: [Sema] Warn about unused variables if we can constant evaluate the initializer.

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315787: [Sema] Warn about unused variables if we can constant evaluate the initializer. (authored by d0k). Repository: rL LLVM https://reviews.llvm.org/D38678 Files: cfe/trunk/lib/Sema/SemaDecl.cpp

r315786 - [ubsan] Don't emit function signatures for non-static member functions

2017-10-13 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Oct 13 18:23:30 2017 New Revision: 315786 URL: http://llvm.org/viewvc/llvm-project?rev=315786&view=rev Log: [ubsan] Don't emit function signatures for non-static member functions The function sanitizer only checks indirect calls through function pointers. This excludes a

[PATCH] D38913: [ubsan] Don't emit function signatures for virtual methods

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315786: [ubsan] Don't emit function signatures for non-static member functions (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D38913?vs=118999&id=119004#toc Repository: rL L

r315785 - [Lex] Avoid out-of-bounds dereference in SkipLineComment

2017-10-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Oct 13 18:18:30 2017 New Revision: 315785 URL: http://llvm.org/viewvc/llvm-project?rev=315785&view=rev Log: [Lex] Avoid out-of-bounds dereference in SkipLineComment Credit to OSS-Fuzz for discovery: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3145 rdar://3452

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-13 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. Thanks, LGTM :) Comment at: ../llvm/tools/clang/include/clang/Driver/Options.td:609-616 +def fdouble_square_bracket_attributes +: Flag<[ "-" ], "fdouble-square-bracket-at

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 6:05 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kumar > wrote: > >> On Oct 13, 2017, at 4:33 PM, Peter Collingbourne > > wrote: >> >> >> >> On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kuma

[PATCH] D38913: [ubsan] Don't emit function signatures for virtual methods

2017-10-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Small nit on the first line of the commit message: it should probably mention non-static member functions, rather than virtual methods. https://reviews.llvm.org/D38913

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 5:59 PM, Vedant Kumar wrote: > > On Oct 13, 2017, at 4:33 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kumar wrote: > >> >> On Oct 13, 2017, at 4:08 PM, Peter Collingbourne wrote: >> >> On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbour

[PATCH] D38903: [ubsan] Only use indirect RTTI in prologues on Darwin

2017-10-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. @pcc made an alternate suggestion which led to https://reviews.llvm.org/D38913. We're still discussing whether the new patch is a sufficient fix. https://reviews.llvm.org/D38903 ___ cfe-commits mailing list cfe-commits@lists.ll

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 4:33 PM, Peter Collingbourne wrote: > > > > On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kumar > wrote: > >> On Oct 13, 2017, at 4:08 PM, Peter Collingbourne > > wrote: >> >> On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne

[PATCH] D38908: Do not link clang_rt.cfi on Android.

2017-10-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D38908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r315784 - Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature.

2017-10-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 13 17:56:24 2017 New Revision: 315784 URL: http://llvm.org/viewvc/llvm-project?rev=315784&view=rev Log: Fix backwards warning for use of C++17 attributes-on-namespaces-and-enumerators feature. Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td cf

[PATCH] D38908: Do not link clang_rt.cfi on Android.

2017-10-13 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: clang/test/Driver/sanitizer-ld.c:605 -// CHECK-CFI-ANDROID: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" -// CHECK-CFI-ANDROID-NOT: libclang_rt.cfi -// CHECK-CFI-ANDROID-NOT: __cfi_check pcc wrote: > Why was this passing befo

[PATCH] D38913: [ubsan] Don't emit function signatures for virtual methods

2017-10-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. The function sanitizer only checks indirect calls through function pointers. This excludes all non-static member functions (constructor calls, calls through thunks, etc all use a separate code path). Don't emit function signatures for functions that won't be checked. Ap

[PATCH] D38908: Do not link clang_rt.cfi on Android.

2017-10-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/test/Driver/sanitizer-ld.c:605 -// CHECK-CFI-ANDROID: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" -// CHECK-CFI-ANDROID-NOT: libclang_rt.cfi -// CHECK-CFI-ANDROID-NOT: __cfi_check Why was this passing before? https://rev

[PATCH] D38678: [Sema] Warn about unused variables if we can constant evaluate the initializer.

2017-10-13 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. Cunning, I like it :) https://reviews.llvm.org/D38678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D38757: [libc++] Fix PR34898 - vector iterator constructors and assign method perform push_back instead of emplace_back.

2017-10-13 Thread David L. Jones via Phabricator via cfe-commits
dlj requested changes to this revision. dlj added a comment. This revision now requires changes to proceed. Hmm, looking more at this change... while it does make the behaviour consistent for Forward and Input iterators, I think it's just making them both do the wrong thing. Specifically, based

r315776 - Allow building libFuzzer tests in two-stage compiler-rt build.

2017-10-13 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Oct 13 16:50:53 2017 New Revision: 315776 URL: http://llvm.org/viewvc/llvm-project?rev=315776&view=rev Log: Allow building libFuzzer tests in two-stage compiler-rt build. Modified: cfe/trunk/runtime/CMakeLists.txt Modified: cfe/trunk/runtime/CMakeLists.txt

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 118990. vsapsai added a comment. - Address rjmccall review comment, move warn_variable_sized_ivar_visibility to DiagnoseVariableSizedIvars. https://reviews.llvm.org/D38773 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/D

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 4:19 PM, Vedant Kumar wrote: > > On Oct 13, 2017, at 4:08 PM, Peter Collingbourne wrote: > > On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne > wrote: > >> Here's a small reproducer. >> >> struct A { >> virtual void f(...); >> }; >> >> struct B : virtual A { >> v

[PATCH] D38908: Do not link clang_rt.cfi on Android.

2017-10-13 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis created this revision. Herald added a subscriber: srhines. The OS provides cross-dso CFI support starting with Android O. Trapping mode does not require any runtime at all, and diagnostic mode requires just ubsan-standalone. https://reviews.llvm.org/D38908 Files: clang/include/clang/D

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 4:08 PM, Peter Collingbourne wrote: > > On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne > wrote: > Here's a small reproducer. > > struct A { > virtual void f(...); > }; > > struct B : virtual A { > virtual void b(); > virtual void f(...

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
On Fri, Oct 13, 2017 at 4:06 PM, Peter Collingbourne wrote: > Here's a small reproducer. > > struct A { > virtual void f(...); > }; > > struct B : virtual A { > virtual void b(); > virtual void f(...); > }; > > void B::f(...) {} > > $ clang++ -fsanitize=function fsan.cpp -ffunction-sections

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Peter Collingbourne via cfe-commits
Here's a small reproducer. struct A { virtual void f(...); }; struct B : virtual A { virtual void b(); virtual void f(...); }; void B::f(...) {} $ clang++ -fsanitize=function fsan.cpp -ffunction-sections -fdata-sections -c -o /dev/null fatal error: error in backend: Cannot represent a dif

r315774 - Revert r315738

2017-10-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Oct 13 15:47:44 2017 New Revision: 315774 URL: http://llvm.org/viewvc/llvm-project?rev=315774&view=rev Log: Revert r315738 The ParsedSourceRange class does not work correctly on Windows with the ':' drive separators Removed: cfe/trunk/test/Refactor/tool-apply-repla

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() yaxunl wrote: > arichardson wrote: > >

r315772 - [Sema] Avoid iterator invalidation when code completing.

2017-10-13 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 13 15:14:34 2017 New Revision: 315772 URL: http://llvm.org/viewvc/llvm-project?rev=315772&view=rev Log: [Sema] Avoid iterator invalidation when code completing. It's possible for the code completion consumer to add new decls to the current scope while lookup happens on i

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 2:52 PM, Eric Christopher wrote: > > > > On Fri, Oct 13, 2017 at 2:50 PM Vedant Kumar > wrote: >> On Oct 13, 2017, at 1:44 PM, Eric Christopher > > wrote: >> >> >> >> On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar >

[PATCH] D38904: Allow building libFuzzer in two-stage compiler-rt build

2017-10-13 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315771: Allow building libFuzzer in two-stage compiler-rt build (authored by george.karpenkov). Changed prior to commit: https://reviews.llvm.org/D38904?vs=118977&id=118979#toc Repository: rL LLVM h

r315771 - Allow building libFuzzer in two-stage compiler-rt build

2017-10-13 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Fri Oct 13 15:03:09 2017 New Revision: 315771 URL: http://llvm.org/viewvc/llvm-project?rev=315771&view=rev Log: Allow building libFuzzer in two-stage compiler-rt build When LLVM_BUILD_EXTERNAL_COMPILER_RT option is set to true, all of projects in compiler-rt are bui

[PATCH] D38903: [ubsan] Only use indirect RTTI in prologues on Darwin

2017-10-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Sounds good. This doesn't seem too controversial, since it just takes us back to the old behavior on all platforms except Darwin. I'll wait an hour or so before committing in case there are any more comments. https://reviews.llvm.org/D38903 _

[PATCH] D38904: Allow building libFuzzer in two-stage compiler-rt build

2017-10-13 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov created this revision. Herald added subscribers: mgorny, dberris. When `LLVM_BUILD_EXTERNAL_COMPILER_RT` option is set to true, all of projects in compiler-rt are built with a freshly-built compiler using a recursive CMake invocation. (e.g. that's how compiler-rt is used in Swift)

[PATCH] D38903: [ubsan] Only use indirect RTTI in prologues on Darwin

2017-10-13 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. Given you were the last one in this code it seems reasonable to let you go for it :) That said, I didn't notice anything in particular that stuck out at me. https://reviews.llvm.org/D38903 ___ cfe-commits mailing list cfe

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Eric Christopher via cfe-commits
On Fri, Oct 13, 2017 at 2:50 PM Vedant Kumar wrote: > On Oct 13, 2017, at 1:44 PM, Eric Christopher wrote: > > > > On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar wrote: > >> On Oct 13, 2017, at 1:39 PM, Vedant Kumar wrote: >> >> Hey Eric, >> >> I'm sorry for the breakage. I made sure to check th

[PATCH] D38903: [ubsan] Only use indirect RTTI in prologues on Darwin

2017-10-13 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Using a layer of indirection to point to RTTI through function prologues is not supported on some setups. One reported error message is: error: Cannot represent a difference across sections This is a regression. This patch limits the indirect RTTI behavior to Darwin,

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 1:44 PM, Eric Christopher wrote: > > > > On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar > wrote: >> On Oct 13, 2017, at 1:39 PM, Vedant Kumar > > wrote: >> >> Hey Eric, >> >> I'm sorry for the breakage. I made sure to check t

[PATCH] D38900: libunwind: document tested FreeBSD configs and sort OS list

2017-10-13 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb added a comment. FreeBSD/i386 also uses llvm libunwind by default. https://reviews.llvm.org/D38900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r315755 - Fix -Woverloaded-virtual warning in clang-refactor

2017-10-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Oct 13 14:15:25 2017 New Revision: 315755 URL: http://llvm.org/viewvc/llvm-project?rev=315755&view=rev Log: Fix -Woverloaded-virtual warning in clang-refactor Modified: cfe/trunk/tools/clang-refactor/ClangRefactor.cpp Modified: cfe/trunk/tools/clang-refactor/ClangR

[PATCH] D38900: libunwind: document tested FreeBSD configs and sort OS list

2017-10-13 Thread Ed Maste via Phabricator via cfe-commits
emaste added a subscriber: bsdjhb. emaste added a comment. In https://reviews.llvm.org/D38900#897304, @krytarowski wrote: > @joerg might have insight on ppc, sparc64, arm on NetBSD. And @bsdjhb for other architectures on FreeBSD. But I wanted to at least list x86_64 and ARM64 for FreeBSD, wher

[PATCH] D38824: [X86] Synchronize the CPU predefined macros with gcc

2017-10-13 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 118973. craig.topper added a comment. Only define "corei7" on nehalem/westmere to match gcc. Don't define anything for the CPUs newer than that. Add comments to the CPUs where gcc has two sets of defines and we have only one. https://reviews.llvm.org/

[PATCH] D23963: [analyzer] pr28449 - Move literal rvalue construction away from RegionStore.

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315750: [analyzer] pr28449: Fix support for various array initializers. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D23963?vs=118625&id=118974#toc Repository: rL LLVM

r315750 - [analyzer] pr28449: Fix support for various array initializers.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 13:54:56 2017 New Revision: 315750 URL: http://llvm.org/viewvc/llvm-project?rev=315750&view=rev Log: [analyzer] pr28449: Fix support for various array initializers. In some cases the analyzer didn't expect an array-type variable to be initialized with anything o

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Eric Christopher via cfe-commits
On Fri, Oct 13, 2017 at 1:42 PM Vedant Kumar wrote: > On Oct 13, 2017, at 1:39 PM, Vedant Kumar wrote: > > Hey Eric, > > I'm sorry for the breakage. I made sure to check the run-time tests in > compiler-rt but we could have missing coverage there. > > The original version of this patch restricte

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
> On Oct 13, 2017, at 1:39 PM, Vedant Kumar wrote: > > Hey Eric, > > I'm sorry for the breakage. I made sure to check the run-time tests in > compiler-rt but we could have missing coverage there. > > The original version of this patch restricted the prologue data changes to > Darwin only. We

[PATCH] D38816: Convert clang::LangAS to a strongly typed enum

2017-10-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/AST/TypePrinter.cpp:1323 OS << "address_space("; -OS << T->getEquivalentType().getAddressSpace(); +OS << T->getEquivalentType() + .getQualifiers() arichardson wrote: > arichardson wrote: > >

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Vedant Kumar via cfe-commits
Hey Eric, I'm sorry for the breakage. I made sure to check the run-time tests in compiler-rt but we could have missing coverage there. The original version of this patch restricted the prologue data changes to Darwin only. We can switch back to that easily, just let me know. vedant > On Oct

[PATCH] D38901: [CUDA] Require libdevice only if needed

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. Looks good. Thank you. https://reviews.llvm.org/D38901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D38901: [CUDA] Require libdevice only if needed

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 118969. Hahnfeld added a comment. Fix one more condition that checks for `nvvm/libdevice` and add a test. https://reviews.llvm.org/D38901 Files: lib/Driver/ToolChains/Cuda.cpp test/Driver/Inputs/CUDA-nolibdevice/usr/local/cuda/bin/.keep test/Driver/I

Re: r313096 - [ubsan] Function Sanitizer: Don't require writable text segments

2017-10-13 Thread Eric Christopher via cfe-commits
Hi Vedant, So this actually broke -fsanitize=function on linux. Han is working up a testcase for it, but letting you know for now that we'll probably need some change here. -eric On Tue, Sep 12, 2017 at 5:05 PM Vedant Kumar via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: vedantk

[PATCH] D38667: AMDGPU: Parse r600 CPU name early and expose FMAF capability

2017-10-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D38667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno updated this revision to Diff 118966. bruno marked 2 inline comments as done. bruno added a comment. Update patch after Anastasia's suggestions https://reviews.llvm.org/D38868 Files: lib/Sema/SemaExprMember.cpp test/Sema/vector_swizzle_length.c test/SemaOpenCL/vector_swizzle_length.

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > gtbercea wrote: > > tra wrote: > > > gtbercea wrote: > > > > gtbercea wrote: > > > > > I would also like to keep the spirit of this code if not in this > > > > >

r315742 - [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 13:11:00 2017 New Revision: 315742 URL: http://llvm.org/viewvc/llvm-project?rev=315742&view=rev Log: [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled. The checker used to crash when a mempcpy's length argument is symbolic. In this cas

[PATCH] D38797: [analyzer] CStringChecker: pr34460: Admit that some casts are hard to model.

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315742: [analyzer] CStringChecker: pr34460: Avoid a crash when a cast is not modeled. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D38797?vs=118597&id=118964#toc Repositor

r315741 - Basic: adjust attributes on `nan` LIBBUILTINs

2017-10-13 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Fri Oct 13 13:07:30 2017 New Revision: 315741 URL: http://llvm.org/viewvc/llvm-project?rev=315741&view=rev Log: Basic: adjust attributes on `nan` LIBBUILTINs The `nan` family of functions will inspect the contents of the parameter that they are passed. As a result, the func

[PATCH] D38901: [CUDA] Require libdevice only if needed

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. The change could use a test. https://reviews.llvm.org/D38901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38901: [CUDA] Require libdevice only if needed

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld created this revision. If the user passes -nocudalib, we can live without it being present. Simplify the code by just checking whether LibDeviceMap is empty. https://reviews.llvm.org/D38901 Files: lib/Driver/ToolChains/Cuda.cpp Index: lib/Driver/ToolChains/Cuda.cpp

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld updated this revision to Diff 118961. Hahnfeld marked an inline comment as done. Hahnfeld edited the summary of this revision. Hahnfeld added a comment. Check that the user didn't specify a value lower than `sm_30` and re-add some code as discussed. https://reviews.llvm.org/D38883 Fil

r315739 - Revert "[CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info", r315731.

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 12:55:01 2017 New Revision: 315739 URL: http://llvm.org/viewvc/llvm-project?rev=315739&view=rev Log: Revert "[CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info", r315731. With this change we fail on the clang-x86_64-linux-selfh

[PATCH] D38110: [libunwind][MIPS]: Add support for unwinding in O32 and N64 processes.

2017-10-13 Thread John Baldwin via Phabricator via cfe-commits
bsdjhb updated this revision to Diff 118960. bsdjhb added a comment. - Check _ABI* rather than _MIPS_SIM. - Save and restore lo/hi. - Expand FIXME comment for more missing registers. - Return UNW_SUCCESS from unw_getcontext(). - Use correct DWARF numbers for hi and lo and put hi first. - Bump high

[PATCH] D38402: [clang-refactor] Apply source replacements

2017-10-13 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315738: [clang-refactor] Apply source replacements (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D38402?vs=118471&id=118959#toc Repository: rL LLVM https://reviews.llvm.o

r315738 - [clang-refactor] Apply source replacements

2017-10-13 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Fri Oct 13 12:42:05 2017 New Revision: 315738 URL: http://llvm.org/viewvc/llvm-project?rev=315738&view=rev Log: [clang-refactor] Apply source replacements This commit actually brings clang-refactor to a usable state as it can now apply the refactoring changes to source file

[PATCH] D38900: libunwind: document tested FreeBSD configs and sort OS list

2017-10-13 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a subscriber: joerg. krytarowski added a comment. @joerg might have insight on ppc, sparc64, arm on NetBSD. https://reviews.llvm.org/D38900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D38900: libunwind: document tested FreeBSD configs and sort OS list

2017-10-13 Thread Ed Maste via Phabricator via cfe-commits
emaste created this revision. Herald added subscribers: kristof.beyls, krytarowski, aemerson. libunwind is known to work on FreeBSD/amd64 and FreeBSD/arm64, and is the default unwinder on both of those architectures. While here sort the OS list. https://reviews.llvm.org/D38900 Files: docs/i

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. F5426271: llvm_lib_target_x86_paths Example output for `llvm/lib/Target/X86` Running it over the whole `llvm/lib` codebase generates a lot of warnings. Please note, that it seems to be common to write code like this: int Val; swi

[PATCH] D38773: [Sema] Add support for flexible array members in Obj-C.

2017-10-13 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:15055 } + // If it is the last field is checked elsewhere. } rjmccall wrote: > vsapsai wrote: > > rjmccall wrote: > > > "Whether" rather than "If", please. You sh

[PATCH] D38877: [analyzer] RetainCount: Accept "safe" CFRetain wrappers.

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315736: [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D38877?vs=118891&id=118953#toc Repository:

r315736 - [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers.

2017-10-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Oct 13 12:10:42 2017 New Revision: 315736 URL: http://llvm.org/viewvc/llvm-project?rev=315736&view=rev Log: [analyzer] RetainCount: Ignore annotations on user-made CFRetain wrappers. It is not uncommon for the users to make their own wrappers around CoreFoundation's CF

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 4 inline comments as done. JonasToth added a comment. Improved check a lot. Hope reviewers now have an easier time reading it. https://reviews.llvm.org/D37808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 6 inline comments as done. JonasToth added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:96 +// Only the default branch (we explicitly matched for default!) exists. +if (CaseCount == 1) { + diag(SwitchWithDefault->getLoc

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 118951. JonasToth marked 2 inline comments as done. JonasToth added a comment. - major codechange https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/MultiwayPathsCoveredCheck.

[PATCH] D37436: Initial implementation of C attributes (WG14 N2137)

2017-10-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D37436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-10-13 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:123 + // Is variable changed anywhere in TU? + for (const Decl *D : AMgr.getASTContext().getTranslationUnitDecl()->decls()) { +if (isChanged(D, VD)) danielmarjamaki w

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Forgot to add, i really noticed/though about it just now, in https://reviews.llvm.org/D38871, because i did not encountered any warnings in that code in stage-2 builds. Repository: rL LLVM https://reviews.llvm.org/D38101 ___

[PATCH] D38868: [OpenCL] Restrict swizzle length check to OpenCL mode

2017-10-13 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno marked 2 inline comments as done. bruno added inline comments. Comment at: test/SemaOpenCL/vector_swizzle_length.cl:7 void foo() { -float8 f2 = (float8)(0, 0, 0, 0, 0, 0, 0, 0); +float8 f2 = (float8){0, 0, 0, 0, 0, 0, 0, 0}; Anastasia wrote: > Ev

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > tra wrote: > > gtbercea wrote: > > > gtbercea wrote: > > > > I would also like to keep the spirit of this code if not in this exact > > > > form at least som

[PATCH] D38796: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315731: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue… (authored by kosarev). Changed prior to commit: https://reviews.llvm.org/D38796?vs=118599&id=118950#toc Repository:

r315731 - [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info

2017-10-13 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Fri Oct 13 11:40:18 2017 New Revision: 315731 URL: http://llvm.org/viewvc/llvm-project?rev=315731&view=rev Log: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info Differential Revision: https://reviews.llvm.org/D38796 Modified: cfe/t

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; tra wrote: > gtbercea wrote: > > gtbercea wrote: > > > I would also like to keep the spirit of this code if not in this exact > > > form at least something that performs the s

r315729 - [X86] Remove 'knm' defines from predefined-arch-macros.c test.

2017-10-13 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Oct 13 11:38:10 2017 New Revision: 315729 URL: http://llvm.org/viewvc/llvm-project?rev=315729&view=rev Log: [X86] Remove 'knm' defines from predefined-arch-macros.c test. Direction seems to be that we dont' want to keep adding these, but I forgot to remove it from the t

[PATCH] D37897: [StaticAnalyzer] Fix ProgramState for static variables that are not written

2017-10-13 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 118947. danielmarjamaki added a comment. Track modification of global static variables in CallGraph construction Repository: rL LLVM https://reviews.llvm.org/D37897 Files: include/clang/AST/Decl.h include/clang/StaticAnalyzer/Core/PathSensiti

[PATCH] D38101: [Sema] Diagnose tautological comparison with type's min/max values

2017-10-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: cfe/trunk/test/Sema/tautological-constant-compare.c:23 + + if (c > macro(255)) + return; I'm having second thoughts about macro handling. Right now we completely ignore the comparisons when the constant is anyho

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > gtbercea wrote: > > I would also like to keep the spirit of this code if not in this exact form > > at least something that performs the same functionality. > @tr

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; gtbercea wrote: > I would also like to keep the spirit of this code if not in this exact form > at least something that performs the same functionality. @tra what's your opini

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

r315723 - [X86] Add skeleton support for knm cpu

2017-10-13 Thread Craig Topper via cfe-commits
Author: ctopper Date: Fri Oct 13 11:14:24 2017 New Revision: 315723 URL: http://llvm.org/viewvc/llvm-project?rev=315723&view=rev Log: [X86] Add skeleton support for knm cpu This adds support Knights Mill CPU. Preprocessor defines match gcc's implementation. Differential Revision: https://review

[PATCH] D38813: [X86] Add skeleton support for "knm" cpu - clang side

2017-10-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315723: [X86] Add skeleton support for knm cpu (authored by ctopper). Changed prior to commit: https://reviews.llvm.org/D38813?vs=118650&id=118945#toc Repository: rL LLVM https://reviews.llvm.org/D3

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.h:90 - } }; I would also like to keep the spirit of this code if not in this exact form at least something that performs the same functionality. https://reviews.llvm.org/D38883 _

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D38883: [CMake][OpenMP] Customize default offloading arch

2017-10-13 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:170-182 -// This code prevents IsValid from being set when -// no libdevice has been found. -bool allEmpty = true; -std::string LibDeviceFile; -for (auto key : LibDeviceMap.keys()) { -

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-13 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp:96 +// Only the default branch (we explicitly matched for default!) exists. +if (CaseCount == 1) { + diag(SwitchWithDefault->getLocStart(), JonasToth wrote

  1   2   >