[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-04-19 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai added a comment. Hi Jonathan, Peter might do not have commit access, please commit it on his behalf, thanks a lot! Regards, Leslie Zhai https://reviews.llvm.org/D29827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

r300667 - Add support for editor placeholders to Clang

2017-04-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Apr 19 03:58:56 2017 New Revision: 300667 URL: http://llvm.org/viewvc/llvm-project?rev=300667&view=rev Log: Add support for editor placeholders to Clang This commit teaches Clang to recognize editor placeholders that are produced when an IDE like Xcode inserts a code-co

[PATCH] D32081: Add support for editor placeholders to Clang's lexer

2017-04-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300667: Add support for editor placeholders to Clang (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D32081?vs=95596&id=95696#toc Repository: rL LLVM https://reviews.llvm.o

[PATCH] D27251: [PPC] some bugs mainly about sign problem fixed in altivec.h

2017-04-19 Thread ZiXuan Wu via Phabricator via cfe-commits
Zeson abandoned this revision. Zeson added a comment. I think this revision is out-of-date. I'd like to abandon it. https://reviews.llvm.org/D27251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-04-19 Thread Peter Wu via Phabricator via cfe-commits
Lekensteyn updated this revision to Diff 95707. Lekensteyn added a comment. v2: rebase on commit ad25f8b712f1ef99020fcb7b5e31dd95b39c6112 (trunk@300661) Based on the context, the change from lib/Driver/Tools.cpp -> lib/Driver/ToolChains/CommonArgs.cpp seems most appropriate (Gnu.cpp seems to be

[PATCH] D32176: Add #pragma clang attribute support for the external_source_symbol attribute

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5769 +// might include a subject list even when it has custom parsing. +if (!Attr.diagnoseAppertainsTo(S, D)) + return true; Instead of duplicating this check in the if statem

r300686 - Avoid assert when a non-static member function is qualified with __unaligned

2017-04-19 Thread Roger Ferrer Ibanez via cfe-commits
Author: rogfer01 Date: Wed Apr 19 07:23:28 2017 New Revision: 300686 URL: http://llvm.org/viewvc/llvm-project?rev=300686&view=rev Log: Avoid assert when a non-static member function is qualified with __unaligned Under -fms-extensions __unaligned is a type-qualifier that can be applied to a non-st

[PATCH] D31976: Avoid assert when a non-static member function is qualified with __unaligned

2017-04-19 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300686: Avoid assert when a non-static member function is qualified with __unaligned (authored by rogfer01). Changed prior to commit: https://reviews.llvm.org/D31976?vs=94962&id=95723#toc Repository:

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. As a note: As follow-up work, we might want to extend Clang to add TBAA metadata to allocas and lifetime.start intrinsics so that the instrumentation pass can mark the types of memory upon declaration/construction instead of only upon first access. https://reviews.llv

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/Decl.cpp:3007 const CXXRecordDecl *Ret = RetType->getAsCXXRecordDecl(); -const auto *MD = dyn_cast(this); -if (Ret && !(MD && MD->getCorrespondingMethodInClass(Ret, true))) { +auto OpCode = getOverloadedOpe

[PATCH] D31097: [clang-tidy] don't warn about implicit widening casts in function calls

2017-04-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki abandoned this revision. danielmarjamaki added a comment. I believe https://reviews.llvm.org/D32164 is better Repository: rL LLVM https://reviews.llvm.org/D31097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D30087: [Driver] Unify linking of OpenMP runtime. NFCI.

2017-04-19 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 https://reviews.llvm.org/D30087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

r300689 - [Driver] Unify linking of OpenMP runtime. NFCI.

2017-04-19 Thread Jonas Hahnfeld via cfe-commits
Author: hahnfeld Date: Wed Apr 19 08:55:39 2017 New Revision: 300689 URL: http://llvm.org/viewvc/llvm-project?rev=300689&view=rev Log: [Driver] Unify linking of OpenMP runtime. NFCI. While at it, extend test for FreeBSD and check for -lrt iff on Linux. Differential Revision: https://reviews.llvm

[PATCH] D30087: [Driver] Unify linking of OpenMP runtime. NFCI.

2017-04-19 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300689: [Driver] Unify linking of OpenMP runtime. NFCI. (authored by Hahnfeld). Changed prior to commit: https://reviews.llvm.org/D30087?vs=94372&id=95733#toc Repository: rL LLVM https://reviews.llv

[PATCH] D29827: [AVR] Add -mmcu option to the driver

2017-04-19 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai accepted this revision. xiangzhai added a comment. This revision is now accepted and ready to land. Hi Peter, Thanks for your rebase! LGTM! > Based on the context, the change from lib/Driver/Tools.cpp -> > lib/Driver/ToolChains/CommonArgs.cpp seems most appropriate (Gnu.cpp seems to

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-04-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki updated this revision to Diff 95740. danielmarjamaki added a comment. Fix review comments - renamed - reorder function arguments (CheckerContext last) Repository: rL LLVM https://reviews.llvm.org/D30295 Files: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1222 +def NoEscape : InheritableAttr { + let Spellings = [GCC<"noescape">, CXX11<"clang", "noescape">]; + let Subjects = SubjectList<[ParmVar], WarnDiag, "ExpectedParameter">; I do not

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-04-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 95737. gtbercea marked an inline comment as done. gtbercea added a comment. Avoid renaming by enabling PTXAS to generate an output file with the appropriate extension, in this case a cubin extension. Repository: rL LLVM https://reviews.llvm.org/D29654

[PATCH] D30295: [analyzer] clarify undef shift result when shift count is negative or exceeds the bit width

2017-04-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki marked 4 inline comments as done. danielmarjamaki added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h:46 -} // end GR namespace +bool isExprResultConformsComparisonRule(CheckerContext &C, +

[PATCH] D32178: Delete unstable integration tests

2017-04-19 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. I think you'd have to check for a maximum host SDK version, and then bump it upstream every time there's a new one thats known to work with the then-current trunk. It can't be done based on language features because by definition, one cannot know what features are goi

[PATCH] D30771: [analyzer] Teach the MallocChecker about Glib API for two arguments

2017-04-19 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki requested changes to this revision. danielmarjamaki added inline comments. This revision now requires changes to proceed. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:788 +SVal MallocChecker::SValBinMulOp(CheckerContext &C, const Expr *Blocks, +

[clang-tools-extra] r300699 - [clang-tidy] misc-misplaced-widening-cast: Disable checking of implicit widening casts by default.

2017-04-19 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Apr 19 09:55:58 2017 New Revision: 300699 URL: http://llvm.org/viewvc/llvm-project?rev=300699&view=rev Log: [clang-tidy] misc-misplaced-widening-cast: Disable checking of implicit widening casts by default. Patch by Ádám Balogh! Differential Revision: https://reviews.llv

[PATCH] D32164: [clang-tidy] misc-misplaced-widening-cast: Disable checking of implicit widening casts by default

2017-04-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300699: [clang-tidy] misc-misplaced-widening-cast: Disable checking of implicit… (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D32164?vs=95563&id=95751#toc Repository: rL LLV

[PATCH] D32176: Add #pragma clang attribute support for the external_source_symbol attribute

2017-04-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 95754. arphaman marked 4 inline comments as done. arphaman added a comment. Addressed Aaron's comments. Repository: rL LLVM https://reviews.llvm.org/D32176 Files: include/clang/Basic/Attr.td lib/Sema/SemaDeclAttr.cpp test/Misc/pragma-attribute-sup

[PATCH] D32176: Add #pragma clang attribute support for the external_source_symbol attribute

2017-04-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5773 + // Check whether the attribute appertains to the given subject. + if (!Attr.diagnoseAppertainsTo(S, D)) +return true; I hoisted it after `diagnoseLangOpts` to keep some tests happy

r300703 - Remove unnecessary condition as suggested by clang-tidy. NFC

2017-04-19 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Apr 19 10:11:10 2017 New Revision: 300703 URL: http://llvm.org/viewvc/llvm-project?rev=300703&view=rev Log: Remove unnecessary condition as suggested by clang-tidy. NFC Patch by: Gergely Angeli! Differential Revision: https://reviews.llvm.org/D31938 Modified: cfe/tru

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#730072, @rjmccall wrote: > Thanks for CC'ing me. There are two problems here. > > The second is that our alias-analysis philosophy says that the fact that two > accesses "sufficiently obviously" can alias should always override TBAA.

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-19 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. This doesn't forbid assigning them to block properties... is that intentional? typedef void (^Block)(int); @interface Foo @property Block B; @end void foo(Foo *f, Block __attribute__((noescape)) b) { f.B = b; } Comment at: includ

[PATCH] D32176: Add #pragma clang attribute support for the external_source_symbol attribute

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D32176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D32231: [CMake] Enable ARM target in Fuchsia toolchain

2017-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. Herald added subscribers: mgorny, rengolin, aemerson. This is still used by some users of Fuchsia toolchain. Also include llc and opt which is useful for development and testing. Repository: rL LLVM https://reviews.llvm.org/D32231 Files: cmake/caches/Fuchsia-

[PATCH] D32231: [CMake] Enable ARM target in Fuchsia toolchain

2017-04-19 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 95766. Repository: rL LLVM https://reviews.llvm.org/D32231 Files: cmake/caches/Fuchsia-stage2.cmake Index: cmake/caches/Fuchsia-stage2.cmake === --- cmake/caches/Fuchsia-stage2.cmake +++ cm

[PATCH] D32176: Add #pragma clang attribute support for the external_source_symbol attribute

2017-04-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300712: Add #pragma clang attribute support to the external_source_symbol attribute (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D32176?vs=95754&id=95767#toc Repository:

r300712 - Add #pragma clang attribute support to the external_source_symbol attribute

2017-04-19 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Apr 19 10:52:11 2017 New Revision: 300712 URL: http://llvm.org/viewvc/llvm-project?rev=300712&view=rev Log: Add #pragma clang attribute support to the external_source_symbol attribute Prior to this commit the external_source_symbol attribute wasn't supported by #pragma

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-19 Thread Adam Kemp via Phabricator via cfe-commits
TheRealAdamKemp added inline comments. Comment at: include/clang/Basic/AttrDocs.td:122 +* Cannot be returned from a function +* Cannot be captured by a block +* Cannot be assigned to a variable This may be too restrictive in some cases. Consider this: ``` typede

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked an inline comment as done. erichkeane added inline comments. Comment at: lib/AST/Decl.cpp:3010 +(OpCode == OO_PlusPlus || OpCode == OO_MinusMinus) && +(this->getNumParams() + (isa(this) ? 1 : 0)) == 2; +if (Ret && !IsPostfix) { --

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. 1 more thing: I excepted post-increment/decrement from this warning because I figured it would give a TON of warnings from people using post-inc/dec in for loops. However, after further discussion with Craig (who brought this up on the mailing list), I severely won

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. Missing a `sanitizer-ld.c` test for freebsd. Comment at: include/clang/Basic/Attr.td:1849 + GNU<"no_sanitize_memory">, + GNU<"no_sanitize_tbaa">]; let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag, ---

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added a comment. In https://reviews.llvm.org/D31885#730038, @hfinkel wrote: > I'm somewhat concerned that this patch is quadratic in the AST. I'd be happy to address this, but I'm not sure how. Memoizing results could be one way, but don't know if that's acceptable. This location in

[PATCH] D32231: [CMake] Enable ARM target in Fuchsia toolchain

2017-04-19 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rL LLVM https://reviews.llvm.org/D32231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

r300718 - Prefer addAttr(Attribute::AttrKind) over the AttributeList overload

2017-04-19 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Apr 19 12:28:52 2017 New Revision: 300718 URL: http://llvm.org/viewvc/llvm-project?rev=300718&view=rev Log: Prefer addAttr(Attribute::AttrKind) over the AttributeList overload This should simplify the call sites, which typically want to tweak one attribute at a time. It shou

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D32207#730681, @erichkeane wrote: > 1 more thing: I excepted post-increment/decrement from this warning because > I figured it would give a TON of warnings from people using post-inc/dec in > for loops. > > However, after further discu

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D31885#730539, @dberlin wrote: > In https://reviews.llvm.org/D31885#730072, @rjmccall wrote: > > > Thanks for CC'ing me. There are two problems here. > > > > The second is that our alias-analysis philosophy says that the fact that > > two ac

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz updated this revision to Diff 95780. kparzysz added a comment. Memoize known results of checking for union access. Repository: rL LLVM https://reviews.llvm.org/D31885 Files: lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/uni

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/clang-builtin-version.cl:32 + work_group_reserve_write_pipe(tmp, tmp); // expected-error{{implicit declaration of function 'work_group_reserve_write_pipe' is invalid in OpenCL}} + // expected-note@-1{{did you mean 'w

r300722 - [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops.

2017-04-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Apr 19 12:54:08 2017 New Revision: 300722 URL: http://llvm.org/viewvc/llvm-project?rev=300722&view=rev Log: [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops. rdar://problem/31635406 Differential Revision: https://reviews.llvm.org/D32187 Modified: cfe

[PATCH] D32187: [CodeGen][ObjC]

2017-04-19 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300722: [Sema][ObjC] Disallow jumping into ObjC fast enumeration loops. (authored by ahatanak). Changed prior to commit: https://reviews.llvm.org/D32187?vs=95667&id=95781#toc Repository: rL LLVM htt

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. The rule we actually want is that no reference to the block derived from the parameter value will survive after the function returns. You can include examples of things that would cause potential escapes, but trying to actually lock down the list seems ill-advised. A

r300723 - [Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679)

2017-04-19 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Apr 19 12:58:30 2017 New Revision: 300723 URL: http://llvm.org/viewvc/llvm-project?rev=300723&view=rev Log: [Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679) The coverage implementation marks functions which won't be emitted as 'deferred

[PATCH] D32144: [Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679)

2017-04-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300723: [Coverage] Don't emit mappings for functions in dependent contexts (fixes… (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D32144?vs=95513&id=95783#toc Repository: rL

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#730766, @rjmccall wrote: > In https://reviews.llvm.org/D31885#730539, @dberlin wrote: > > > In https://reviews.llvm.org/D31885#730072, @rjmccall wrote: > > > > > Thanks for CC'ing me. There are two problems here. > > > > > > The second

[PATCH] D31542: [clang-tidy] Extend readability-container-size-empty to add comparisons to newly-constructed objects

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/utils/ASTUtils.cpp:28 +bool IsBinaryOrTernary(const Expr *expr) { + if (clang::isa(expr->IgnoreImpCasts()) || + clang::isa(expr->IgnoreImpCasts())) { Rather than call `IgnoreImpCasts()` three times

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. > There was a deliberate decision to make TBAA conservative about type punning > in LLVM because, in practice, the strict form of TBAA you think we should > follow has proven to be a failed optimization paradigm: it just leads users > to globally disable TBAA, which is

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D31885#730728, @kparzysz wrote: > In https://reviews.llvm.org/D31885#730038, @hfinkel wrote: > > > I'm somewhat concerned that this patch is quadratic in the AST. > > > I'd be happy to address this, but I'm not sure how. Memoizing results coul

[PATCH] D32237: [OpenMP] Prepare sema to support combined constructs with omp distribute and omp for

2017-04-19 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: rL LLVM https://reviews.llvm.org/D32237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 95797. erichkeane added a comment. As discussed, removed the exception for postfix operators. It seems like the right thing to do.I didn't add the [[nodiscard]] test, since it is the same intended behavior now. https://reviews.llvm.org/D32207 Files:

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D31885#730799, @dberlin wrote: > In https://reviews.llvm.org/D31885#730766, @rjmccall wrote: > > > In https://reviews.llvm.org/D31885#730539, @dberlin wrote: > > > > > In https://reviews.llvm.org/D31885#730072, @rjmccall wrote: > > > > > > > T

[PATCH] D31975: [Analyzer] Iterator Checkers

2017-04-19 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. @baloghadamsoftware Thanks for working on this! However, this patch is getting too big. Could you, please, split it into incremental patches so that it would be easier to review? More motivation of why this is very important is here http://llvm.org/docs/DeveloperPol

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. > Your proposal to we simply drop TBAA from all accesses related to unions is > extremely conservative. It means that an access through a union has to be > treated as potentially aliasing every other visible access, at least in terms > of their types. That level of

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D31885#730853, @hfinkel wrote: > > There was a deliberate decision to make TBAA conservative about type > > punning in LLVM because, in practice, the strict form of TBAA you think we > > should follow has proven to be a failed optimization p

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#730909, @rjmccall wrote: > In https://reviews.llvm.org/D31885#730853, @hfinkel wrote: > > > > There was a deliberate decision to make TBAA conservative about type > > > punning in LLVM because, in practice, the strict form of TBAA you t

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm surprised this change didn't cause any other tests to need to be updated. A few small formatting nits and a request for another test, but otherwise looking good. Comment at: test/SemaCXX/warn-unused-result.cpp:166 +// C++ Methods should warn

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D31885#730920, @dberlin wrote: > Just so i understand: Ignoring everything else (we can't actually make > likelyalias work, i think the code in the bugs makes that very clear), None of the code in the bugs I've seen makes that very clear, b

[PATCH] D32238: [Clangd] Failed to decode params using 1.x-compatible request message

2017-04-19 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added a comment. A test case would be nice. Repository: rL LLVM https://reviews.llvm.org/D32238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32234: [Clangd] Support Authority-less URIs

2017-04-19 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. This is fine. Test case would be nice though. Repository: rL LLVM https://reviews.llvm.org/D32234 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Daniel Berlin via Phabricator via cfe-commits
dberlin added a comment. In https://reviews.llvm.org/D31885#730936, @rjmccall wrote: > In https://reviews.llvm.org/D31885#730920, @dberlin wrote: > > > Just so i understand: Ignoring everything else (we can't actually make > > likelyalias work, i think the code in the bugs makes that very clear)

r300738 - [sanitizer-coverage] deprecate some of the stale coverage variants

2017-04-19 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Apr 19 14:57:16 2017 New Revision: 300738 URL: http://llvm.org/viewvc/llvm-project?rev=300738&view=rev Log: [sanitizer-coverage] deprecate some of the stale coverage variants Modified: cfe/trunk/docs/SanitizerCoverage.rst cfe/trunk/lib/Driver/SanitizerArgs.cpp cf

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 95807. erichkeane marked 3 inline comments as done. erichkeane added a comment. Added the tests, plus the two formatting changes. https://reviews.llvm.org/D32207 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp test/SemaCXX/warn-unused-result.cpp

r300741 - Parse backend options during thinlto backend compile actions

2017-04-19 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Wed Apr 19 15:08:21 2017 New Revision: 300741 URL: http://llvm.org/viewvc/llvm-project?rev=300741&view=rev Log: Parse backend options during thinlto backend compile actions Added: cfe/trunk/test/CodeGen/thinlto-backend-option.ll Modified: cfe/trunk/lib/CodeGen/Backe

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D32207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[libcxx] r300743 - [libc++] Use _LIBCPP_ABI_MICROSOFT instead of _MSC_VER

2017-04-19 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Wed Apr 19 15:11:04 2017 New Revision: 300743 URL: http://llvm.org/viewvc/llvm-project?rev=300743&view=rev Log: [libc++] Use _LIBCPP_ABI_MICROSOFT instead of _MSC_VER _LIBCPP_ABI_MICROSOFT is more appropriate to use here, since the conditionals are controlling Microsoft mang

r300744 - [sanitizer-coverage] deprecate -fsanitize-coverage=8bit-counters

2017-04-19 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Apr 19 15:15:58 2017 New Revision: 300744 URL: http://llvm.org/viewvc/llvm-project?rev=300744&view=rev Log: [sanitizer-coverage] deprecate -fsanitize-coverage=8bit-counters Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp cfe/trunk/test/Driver/fsanitize-coverage.c M

[PATCH] D32234: [Clangd] Support Authority-less URIs

2017-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson updated this revision to Diff 95809. malaperle-ericsson added a comment. Add test https://reviews.llvm.org/D32234 Files: clangd/Protocol.cpp test/clangd/completion.test Index: test/clangd/completion.test ==

[PATCH] D32238: [Clangd] Failed to decode params using 1.x-compatible request message

2017-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson updated this revision to Diff 95811. malaperle-ericsson added a comment. Add test https://reviews.llvm.org/D32238 Files: clangd/Protocol.cpp test/clangd/completion.test Index: test/clangd/completion.test ==

[PATCH] D32243: Fix a leak in tools/driver/cc1as_main.cpp

2017-04-19 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc created this revision. For some reason, the asan bot has recently started reporting this leak even though it existed for ages. https://reviews.llvm.org/D32243 Files: tools/driver/cc1as_main.cpp Index: tools/driver/cc1as_main.cpp =

[PATCH] D32243: Fix a leak in tools/driver/cc1as_main.cpp

2017-04-19 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/D32243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D31885#730958, @dberlin wrote: > In https://reviews.llvm.org/D31885#730936, @rjmccall wrote: > > > In https://reviews.llvm.org/D31885#730920, @dberlin wrote: > > > > > Just so i understand: Ignoring everything else (we can't actually make > >

r300755 - Fix a leak in tools/driver/cc1as_main.cpp

2017-04-19 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Apr 19 15:57:13 2017 New Revision: 300755 URL: http://llvm.org/viewvc/llvm-project?rev=300755&view=rev Log: Fix a leak in tools/driver/cc1as_main.cpp Summary: For some reason, the asan bot has recently started reporting this leak even though it existed for ages. Reviewers:

r300756 - [CodeGen] Use preincrement version of APInt::operator++ instead of postincrement to avoid creating and immediately discarding a temporary APInt.

2017-04-19 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Apr 19 16:02:45 2017 New Revision: 300756 URL: http://llvm.org/viewvc/llvm-project?rev=300756&view=rev Log: [CodeGen] Use preincrement version of APInt::operator++ instead of postincrement to avoid creating and immediately discarding a temporary APInt. This is preparati

r300762 - Fix assertion failure in codegen on non-template deduction guide.

2017-04-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Apr 19 16:15:45 2017 New Revision: 300762 URL: http://llvm.org/viewvc/llvm-project?rev=300762&view=rev Log: Fix assertion failure in codegen on non-template deduction guide. Added: cfe/trunk/test/CodeGenCXX/cxx1z-class-deduction.cpp Modified: cfe/trunk/lib/CodeGen

r300764 - Corrrect warn_unused_result attribute

2017-04-19 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Apr 19 16:24:55 2017 New Revision: 300764 URL: http://llvm.org/viewvc/llvm-project?rev=300764&view=rev Log: Corrrect warn_unused_result attribute The original idea was that if the attribute on an operator, that the return-value unused-ness wouldn't matter. However,

[PATCH] D32207: Corrrect warn_unused_result attribute

2017-04-19 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300764: Corrrect warn_unused_result attribute (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D32207?vs=95807&id=95823#toc Repository: rL LLVM https://reviews.llvm.org/D

r300767 - [sanitizer-coverage] deprecate -fsanitize-coverage=trace-bb

2017-04-19 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Apr 19 16:31:11 2017 New Revision: 300767 URL: http://llvm.org/viewvc/llvm-project?rev=300767&view=rev Log: [sanitizer-coverage] deprecate -fsanitize-coverage=trace-bb Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp cfe/trunk/test/Driver/fsanitize-coverage.c Modifi

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D32199#730716, @filcab wrote: > Missing a `sanitizer-ld.c` test for freebsd. Thanks for pointing this out. I'm going to remove the freebsd change for now. I suspect it works, but I've not tested it yet. Comment at: includ

[PATCH] D32064: [asan] Disable ASan global-GC depending on the target and compiler flags

2017-04-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: chandlerc. rnk added a comment. In https://reviews.llvm.org/D32064#728683, @pcc wrote: > In https://reviews.llvm.org/D32064#728629, @rnk wrote: > > > In https://reviews.llvm.org/D32064#726861, @pcc wrote: > > > > > I think it would be better to move this logic to the drive

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel updated this revision to Diff 95829. hfinkel added a comment. Updated per review comments (use only no_sanitize("tbaa") instead of adding no_sanitize_tbaa and don't touch freebsd for now). https://reviews.llvm.org/D32199 Files: include/clang/Basic/Sanitizers.def include/clang/Drive

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. Alloca always returns a pointer in alloca address space, which may be different from the type defined by the language. For example, in C++ the auto variables are in the default address space. Therefore cast alloca to the expected address space when necessary. https:

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. I don't like calling this a "TBAA sanitizer". What we're sanitizing is the object model and effective type rules; it seems irrelevant which specific compiler analysis passes would result in your program misbehaving if you break the rules. I would also expect that we will

[libcxx] r300770 - Fix typo in Windows test configuration code

2017-04-19 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Apr 19 16:52:08 2017 New Revision: 300770 URL: http://llvm.org/viewvc/llvm-project?rev=300770&view=rev Log: Fix typo in Windows test configuration code Modified: libcxx/trunk/utils/libcxx/test/config.py Modified: libcxx/trunk/utils/libcxx/test/config.py URL: http://

[PATCH] D31542: [clang-tidy] Extend readability-container-size-empty to add comparisons to newly-constructed objects

2017-04-19 Thread Josh Zimmerman via Phabricator via cfe-commits
joshz updated this revision to Diff 95833. joshz marked 3 inline comments as done. joshz added a comment. Clean up IsBinaryOrTernary Repository: rL LLVM https://reviews.llvm.org/D31542 Files: clang-tidy/readability/ContainerSizeEmptyCheck.cpp clang-tidy/utils/ASTUtils.cpp clang-tidy/ut

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D32210#730553, @jroelofs wrote: > This doesn't forbid assigning them to block properties... is that intentional? > > typedef void (^Block)(int); > > @interface Foo > @property Block B; > @end > > void foo(Foo *f, Block __attribut

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D32210#730777, @rjmccall wrote: > The rule we actually want is that no reference to the block derived from the > parameter value will survive after the function returns. You can include > examples of things that would cause potential escape

r300776 - [sanitizer-coverage] trim down the docs

2017-04-19 Thread Kostya Serebryany via cfe-commits
Author: kcc Date: Wed Apr 19 17:25:30 2017 New Revision: 300776 URL: http://llvm.org/viewvc/llvm-project?rev=300776&view=rev Log: [sanitizer-coverage] trim down the docs Modified: cfe/trunk/docs/SanitizerCoverage.rst Modified: cfe/trunk/docs/SanitizerCoverage.rst URL: http://llvm.org/viewvc

[PATCH] D32064: [asan] Disable ASan global-GC depending on the target and compiler flags

2017-04-19 Thread Evgeniy Stepanov via Phabricator via cfe-commits
eugenis added a comment. The ultimate solution would be a function attribute - if we want this thing to work correctly with LTO. But it sounds a bit like overkill, plus none of the settings it depends on (integrated-as, data-sections) work with LTO anway: the former is ignored and the second do

[PATCH] D32064: [asan] Disable ASan global-GC depending on the target and compiler flags

2017-04-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. I won't stand in the way here if others feel strongly that the flag should be passed via a constructor. It will just mean more work to be done if/when this flag is ever changed to be passed via some other mechanism, but that's a relatively minor detail. Repository: rL L

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D32199#731144, @rsmith wrote: > ... > I would also expect that we will extend this in future to assign types to > storage even in cases where there is no store (for instance, we should be > able to catch `float f() { int n; return *(float*

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-04-19 Thread Tony Tye via Phabricator via cfe-commits
t-tye added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:1105-1119 + // Alloca always returns a pointer in alloca address space, which may + // be different from the type defined by the language. For example, + // in C++ the auto variables are in the default address spa

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D32199#731249, @hfinkel wrote: > In https://reviews.llvm.org/D32199#731144, @rsmith wrote: > > > > > > ... > > > I would also expect that we will extend this in future to assign types to > > storage even in cases where there is no store (for i

[PATCH] D32210: [Sema][ObjC] Add support for attribute "noescape"

2017-04-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D32210#731192, @ahatanak wrote: > In https://reviews.llvm.org/D32210#730777, @rjmccall wrote: > > > The rule we actually want is that no reference to the block derived from > > the parameter value will survive after the function returns. You

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-04-19 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D31885#730853, @hfinkel wrote: > ... > > >> (And the nonsensicality of the standard very much continues. The code that >> we've all agreed is obviously being miscompiled here is still a strict >> violation of the "improved" union rules i

[PATCH] D32199: [TBAASan] A TBAA Sanitizer (Clang)

2017-04-19 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. > ! In https://reviews.llvm.org/D32199#731252, @hfinkel wrote: > >> How about renaming this to something more like `-fsanitize=type`? > > I'm fine with that. Do you like TypeSanitizer or TypeAccessSantizer or > TypeAliasingSanitizer best? I think calling it a type alias

  1   2   >