[PATCH] D23657: Remove some false positives when taking the address of packed members

2016-10-21 Thread Roger Ferrer Ibanez via cfe-commits
rogfer01 updated this revision to Diff 75395. rogfer01 added a comment. Mark comment as TODO https://reviews.llvm.org/D23657 Files: include/clang/Sema/Sema.h lib/Sema/SemaChecking.cpp test/Sema/address-packed.c Index: test/Sema/address-packed.c ===

r284811 - Revert "DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules."

2016-10-21 Thread Renato Golin via cfe-commits
Author: rengolin Date: Fri Oct 21 03:03:49 2016 New Revision: 284811 URL: http://llvm.org/viewvc/llvm-project?rev=284811&view=rev Log: Revert "DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules." This reverts commit r284800, as it failed all ARM/AArch64 bots. Removed:

Re: r284800 - DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.

2016-10-21 Thread Renato Golin via cfe-commits
On 21 October 2016 at 03:36, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Thu Oct 20 21:36:37 2016 > New Revision: 284800 > > URL: http://llvm.org/viewvc/llvm-project?rev=284800&view=rev > Log: > DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules. Hi Richa

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2016-10-21 Thread Simon Dardis via cfe-commits
sdardis created this revision. sdardis added subscribers: rnk, bruno, ahatanak, cfe-commits. Herald added a reviewer: vkalintiris. This patch teaches clang to perform implicit scalar to vector conversions when one of the operands to a binary vector expression is a scalar like GCC. The scalar is i

[PATCH] D25817: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects

2016-10-21 Thread Alex Lorenz via cfe-commits
arphaman updated this revision to Diff 75403. arphaman added a comment. The updated patch improves error handling and adds a test for the fixit. > If we issue a fixit we should recover as-if the code was written with the > fixit in. Does this code do that? (can we test it? I know we test some fi

[PATCH] D25816: Use descriptive message if list initializer is incorrectly parenthesized.

2016-10-21 Thread Serge Pavlov via cfe-commits
sepavloff updated this revision to Diff 75404. sepavloff added a comment. Addressed reviewr's notes. https://reviews.llvm.org/D25816 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaExprCXX.cpp test/SemaCXX/cxx0x-initialize

r284815 - Remove non-existing file from modulemap.

2016-10-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 21 05:19:37 2016 New Revision: 284815 URL: http://llvm.org/viewvc/llvm-project?rev=284815&view=rev Log: Remove non-existing file from modulemap. This picked up a builtin header if it happened to be available. Modified: cfe/trunk/test/Modules/Inputs/libc-libcxx/sysr

[PATCH] D25816: Use descriptive message if list initializer is incorrectly parenthesized.

2016-10-21 Thread Serge Pavlov via cfe-commits
sepavloff marked 5 inline comments as done. sepavloff added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1762 def err_init_incomplete_type : Error<"initialization of incomplete type %0">; +def err_list_init_in_parens : Error<"list-initializer for non-c

[PATCH] D25817: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects

2016-10-21 Thread Alex Lorenz via cfe-commits
arphaman updated this revision to Diff 75405. arphaman added a comment. Fix a typo in the fixit test. Repository: rL LLVM https://reviews.llvm.org/D25817 Files: lib/Sema/SemaExprCXX.cpp test/CXX/special/class.dtor/p10-0x.cpp test/FixIt/fixit.cpp test/SemaCXX/pseudo-destructors.cpp I

[PATCH] D25820: [Sema][Objective-C] Formatting warnings should see through Objective-C message sends

2016-10-21 Thread Alex Lorenz via cfe-commits
arphaman updated this revision to Diff 75408. arphaman marked an inline comment as done. arphaman added a comment. The updated patch includes positive test cases. Repository: rL LLVM https://reviews.llvm.org/D25820 Files: lib/Sema/SemaChecking.cpp test/SemaObjC/format-strings-objc.m In

[PATCH] D25816: Use descriptive message if list initializer is incorrectly parenthesized.

2016-10-21 Thread Alex Lorenz via cfe-commits
arphaman added a subscriber: rsmith. arphaman added a comment. LGTM, I added Richard in case he has something to add. > I chose to retain current clang behavior and reject questionable code. GCC > patch that introduced this message explains using warning by some > uncertainty, 5 years passed, I

[PATCH] D23765: Fix for clang PR 29087

2016-10-21 Thread Serge Pavlov via cfe-commits
sepavloff added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4231 +const CXXConstructorDecl *Constructor = nullptr; +if (const ConstructorUsingShadowDecl *CSD = +dyn_cast(ND)) { Use `auto` here. Type of `CSD` is clear from `dy

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-21 Thread Artem Dergachev via cfe-commits
NoQ updated this revision to Diff 75411. NoQ marked 5 inline comments as done. NoQ added a comment. Address review comments. Add the forgotten tests. https://reviews.llvm.org/D25731 Files: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp test/Analysis/number-object-conversion.c

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-21 Thread Artem Dergachev via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/NumberObjectConversionChecker.cpp:149 BugReporter &BR) const { MatchFinder F; Callback CB(this, BR, AM.getAnalysisD

[PATCH] D25777: [Sema][TreeTransform] Re-create DesignatedInitExpr when it has a field designator with a valid FieldDecl

2016-10-21 Thread Alex Lorenz via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D25777#575564, @rjmccall wrote: > The fact that this bug only arises when performing a *second* instantiation > suggests that there's a deeper bug here, because template instantiation is > not supposed to modify the pattern AST. In this cas

[PATCH] D25777: [Sema][TreeTransform] Re-create DesignatedInitExpr when it has a field designator with a valid FieldDecl

2016-10-21 Thread Alex Lorenz via cfe-commits
arphaman updated this revision to Diff 75414. arphaman added a comment. The updated patch addresses John's comment by modifying the `DesignatedInitExpr` re-creation logic. Repository: rL LLVM https://reviews.llvm.org/D25777 Files: lib/Sema/TreeTransform.h test/SemaCXX/designated-initial

[PATCH] D25311: Add FixItHint for missing #include (err_module_unimported_use_header)

2016-10-21 Thread Sam McCall via cfe-commits
sammccall added a comment. > I don't know the history behind the desired dependencies, I'll let others > comment whether this is OK, but my guess it that it depends on the tradeoff, > it's hard to justify 3 new deps for a change that is supposed to be simple. > How hard is to implement this wit

[PATCH] D25869: [Driver] Add unit tests for DetectDistro()

2016-10-21 Thread Michał Górny via cfe-commits
mgorny created this revision. mgorny added reviewers: bruno, bkramer, rafael. mgorny added a subscriber: cfe-commits. Herald added a subscriber: beanz. Add a set of unit tests for the DetectDistro() function in Driver. Make the function itself (and the enum) visible in the library for the tests.

[PATCH] D25311: Add FixItHint for missing #include (err_module_unimported_use_header)

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer added a comment. In https://reviews.llvm.org/D25311#574806, @bruno wrote: > I don't know the history behind the desired dependencies, I'll let others > comment whether this is OK, but my guess it that it depends on the tradeoff, > it's hard to justify 3 new deps for a change that is sup

[PATCH] D25871: Include full filename range for missing includes

2016-10-21 Thread Erik Verbruggen via cfe-commits
erikjv created this revision. erikjv added reviewers: bkramer, klimek. erikjv added a subscriber: cfe-commits. For the purpose of highlighting in an IDE. https://reviews.llvm.org/D25871 Files: lib/Lex/PPDirectives.cpp test/Preprocessor/missing-include-range-check.h Index: test/Preprocesso

[PATCH] D25870: Fix 'unknown documentation command' warning ranges

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Nice. Thanks! https://reviews.llvm.org/D25870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D25870: Fix 'unknown documentation command' warning ranges

2016-10-21 Thread Erik Verbruggen via cfe-commits
erikjv created this revision. erikjv added reviewers: bkramer, klimek. erikjv added a subscriber: cfe-commits. Warnings generated by -Wdocumentation-unknown-command did only have a start location, not a full source range. This resulted in only the "carret" being show in messages, and IDEs highligh

[PATCH] D25871: Include full filename range for missing includes

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D25871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D25450: [clang-tidy] Fix identifier naming in macro args.

2016-10-21 Thread Jason Henline via cfe-commits
jhen updated this revision to Diff 75430. jhen added a comment. - Early exit if not Failure.ShouldFix https://reviews.llvm.org/D25450 Files: clang-tidy/readability/IdentifierNamingCheck.cpp test/clang-tidy/readability-identifier-naming.cpp Index: test/clang-tidy/readability-identifier-nami

[PATCH] D25450: [clang-tidy] Fix identifier naming in macro args.

2016-10-21 Thread Jason Henline via cfe-commits
jhen marked an inline comment as done. jhen added inline comments. Comment at: clang-tidy/readability/IdentifierNamingCheck.cpp:654 + RangeIsEntirelyWithinMacroArgument || !RangeContainsMacroExpansion; + Failure.ShouldFix = Failure.ShouldFix && RangeCanBeFixed; } -

[PATCH] D25450: [clang-tidy] Fix identifier naming in macro args.

2016-10-21 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! https://reviews.llvm.org/D25450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-

[PATCH] D25820: [Sema][Objective-C] Formatting warnings should see through Objective-C message sends

2016-10-21 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you! Repository: rL LLVM https://reviews.llvm.org/D25820 ___ cfe-comm

[PATCH] D25363: [Sema] Store a SourceRange for multi-token builtin types

2016-10-21 Thread Malcolm Parsons via cfe-commits
malcolm.parsons added inline comments. Comment at: include/clang/AST/TypeLoc.h:533 +} else { + BuiltinRange.setBegin(std::min(Range.getBegin(), BuiltinRange.getBegin())); + BuiltinRange.setEnd(std::max(Range.getEnd(), BuiltinRange.getEnd())); aaron

[PATCH] D25363: [Sema] Store a SourceRange for multi-token builtin types

2016-10-21 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/TypeLoc.h:533 +} else { + BuiltinRange.setBegin(std::min(Range.getBegin(), BuiltinRange.getBegin())); + BuiltinRange.setEnd(std::max(Range.getEnd(), BuiltinRange.getEnd())); malcolm

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Is it not possible to write a testcase for this? https://reviews.llvm.org/D25796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with two minor nits. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:102 + SpecialMemberFunctionKind Kind

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Hi, friendly ping? This trivial patch is the only blocker remaining before I can land https://reviews.llvm.org/D25648, which is the first part of my Grand Set Refactoring (see mail to llvm-dev about a week ago). Repository: rL LLVM https://reviews.llvm.org/D25647

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kind); +} jle

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you very much for the review! Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kin

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you very much for the review! Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kin

[PATCH] D23765: Fix for clang PR 29087

2016-10-21 Thread Taewook Oh via cfe-commits
twoh updated this revision to Diff 75441. twoh marked an inline comment as done. twoh added a comment. Addressing comments from @sepavloff. Thanks! https://reviews.llvm.org/D23765 Files: lib/Sema/SemaExprCXX.cpp test/SemaCXX/cxx11-crashes.cpp Index: test/SemaCXX/cxx11-crashes.cpp

r284836 - Remove unnecessary x86 backend requirements from OpenMP tests

2016-10-21 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Fri Oct 21 11:09:20 2016 New Revision: 284836 URL: http://llvm.org/viewvc/llvm-project?rev=284836&view=rev Log: Remove unnecessary x86 backend requirements from OpenMP tests Clang can generate LLVM IR for x86 without a registered x86 backend. Modified: cfe/trunk/test/OpenMP

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 75443. jlebar marked 5 inline comments as done. jlebar added a comment. Adjust formatting, write out type of 'auto'. https://reviews.llvm.org/D25647 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp clang-tools-extra/c

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kind); +} jleb

[PATCH] D25844: [Sema][ObjC] Warn about implicitly autoreleasing indirect parameters that are captured by blocks

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak updated this revision to Diff 75442. ahatanak marked an inline comment as done. ahatanak added a comment. Improve warning messages. https://reviews.llvm.org/D25844 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp te

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8044 // the vector element type and splat. - // FIXME: this should also work for regular vector types as supported in GCC. - if (!RHSVecType && isa(LHSVecType)) { + if (!RHSVecType && isa(LHSVecType)) {

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:2596 - QualType FnType = Context.getFunctionType(Return, Params, EPI); - FunctionDecl *Alloc = -FunctionDecl::Create(Context, GlobalCtx, SourceLocation(), - SourceLocation(), Name,

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8044 // the vector element type and splat. - // FIXME: this should also work for regular vector types as supported in GCC. - if (!RHSVecType && isa(LHSVecType)) { + if (!RHSVecType && isa(LHSVecType)) {

[PATCH] D25731: [analyzer] NumberObjectConversion: Support OSNumber and CFNumberRef.

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: test/Analysis/number-object-conversion.c:14 + if (p) {} // expected-warning{{Converting 'CFNumberRef' to a plain boolean value for branching; please compare the pointer to NULL instead to suppress this warning}} + if (!p) {} // exp

[PATCH] D20811: [analyzer] Model some library functions

2016-10-21 Thread Artem Dergachev via cfe-commits
NoQ updated this revision to Diff 75446. NoQ added a comment. Herald added a subscriber: modocache. Update the domain-specific language for function specs/summaries. https://reviews.llvm.org/D20811 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLis

r284843 - Removed unused function argument. NFC.

2016-10-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Oct 21 12:15:46 2016 New Revision: 284843 URL: http://llvm.org/viewvc/llvm-project?rev=284843&view=rev Log: Removed unused function argument. NFC. Differential Revision: https://reviews.llvm.org/D25839 Modified: cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/lib/Sema

[PATCH] D25839: Removed unused function argument. NFC.

2016-10-21 Thread Artem Belevich via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284843: Removed unused function argument. NFC. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D25839?vs=75339&id=75447#toc Repository: rL LLVM https://reviews.llvm.org/D25839

[PATCH] D25579: [codeview] emit debug info for indirect virtual base classes

2016-10-21 Thread Bob Haarman via cfe-commits
inglorion added a comment. We also need https://reviews.llvm.org/D25578 in before this can land. https://reviews.llvm.org/D25579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D20811: [analyzer] Model some library functions

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This looks great! Comment at: lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:694 +INVALIDATION_APPROACH(EvalCallAsPure)) + CASE // Is certainly uppercase. +ARGUMENT_CONDITION(ARG_N

Re: r284815 - Remove non-existing file from modulemap.

2016-10-21 Thread Bruno Cardoso Lopes via cfe-commits
Thanks Ben! On Fri, Oct 21, 2016 at 3:19 AM, Benjamin Kramer via cfe-commits wrote: > Author: d0k > Date: Fri Oct 21 05:19:37 2016 > New Revision: 284815 > > URL: http://llvm.org/viewvc/llvm-project?rev=284815&view=rev > Log: > Remove non-existing file from modulemap. > > This picked up a builtin

[PATCH] D24799: [XRay] Check in Clang whether XRay supports the target when -fxray-instrument is passed

2016-10-21 Thread Serge Rogatch via cfe-commits
rSerge updated this revision to Diff 75452. rSerge added a comment. I had to add the root directories `a` and `b` manually, as I couldn't find an `svn diff` argument for that. The code file `Tools.cpp` was run via `clang-format`, then just my changes were copy-pasted. 2 tests have been added to

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/SemaCUDA/function-template-overload.cu:62 +template constexpr T overload_ce_implicit_hd(T a) { return a+1; } +// expected-note@-1 3 {{candidate template ignored: target attributes do not match}} + Oh, I didn't know

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna created this revision. zaks.anna added reviewers: dcoughlin, NoQ. zaks.anna added subscribers: cfe-commits, rgov. This patch contains 2 improvements to the CFNumber checker: - Checking of CFNumberGetValue misuse. - Treating all CFNumber API misuse errors as non-fatal. (Previously we tre

r284856 - Remove move constructors that are identical to the generated default move ctor.

2016-10-21 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Oct 21 13:55:07 2016 New Revision: 284856 URL: http://llvm.org/viewvc/llvm-project?rev=284856&view=rev Log: Remove move constructors that are identical to the generated default move ctor. Modified: cfe/trunk/include/clang/Analysis/Analyses/Consumed.h cfe/trunk/includ

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75462. tra added a comment. Addressed jlebar's comments. https://reviews.llvm.org/D25796 Files: lib/Sema/SemaExprCXX.cpp test/SemaCUDA/overloaded-delete.cu Index: test/SemaCUDA/overloaded-delete.cu ==

[clang-tools-extra] r284859 - [clang-move] Support moving template class forward declarations.

2016-10-21 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Oct 21 14:26:43 2016 New Revision: 284859 URL: http://llvm.org/viewvc/llvm-project?rev=284859&view=rev Log: [clang-move] Support moving template class forward declarations. Modified: clang-tools-extra/trunk/clang-move/ClangMove.cpp clang-tools-extra/trunk/unittest

Re: [PATCH] D25199: [ubsan] Sanitize deleted pointers

2016-10-21 Thread Richard Smith via cfe-commits
On Tue, Oct 4, 2016 at 11:43 AM, Matt Gingell wrote: > Hi Richard, > > Thanks for your analysis. > > This patch is intended to mitigate use-after-free bugs. In that context a > “define strict behavior for invalid pointer values” we could deploy in > production code would be very useful. Maybe cal

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExprCXX.cpp:2596 - QualType FnType = Context.getFunctionType(Return, Params, EPI); - FunctionDecl *Alloc = -FunctionDecl::Create(Context,

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin added inline comments. Comment at: test/Analysis/CFNumber.c:39 + unsigned char scalar = 0; + CFNumberGetValue(x, kCFNumberSInt16Type, &scalar); // expected-warning{{A CFNumber object that represents a 16 bit integer is used to initialize an 8 bit integer. 8 bits of

r284869 - [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 15:08:52 2016 New Revision: 284869 URL: http://llvm.org/viewvc/llvm-project?rev=284869&view=rev Log: [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable. Summary: NFC Reviewers: rnk Subscribers: cfe-commits Differential Revision: https://

[PATCH] D25797: [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable.

2016-10-21 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284869: [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25797?vs=75231&id=75474#toc Repository: r

[clang-tools-extra] r284873 - [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 15:13:39 2016 New Revision: 284873 URL: http://llvm.org/viewvc/llvm-project?rev=284873&view=rev Log: [clang-tidy] Don't use a SmallSetVector of an enum. Summary: This doesn't work after converting SmallSetVector to use DenseSet. Instead we can just use a SmallVect

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284873: [clang-tidy] Don't use a SmallSetVector of an enum. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25647?vs=75443&id=75478#toc Repository: rL LLVM https://reviews.l

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you for the reviews, everyone! Repository: rL LLVM https://reviews.llvm.org/D25647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r284877 - Remove accidentally checked in assert.

2016-10-21 Thread Vassil Vassilev via cfe-commits
Author: vvassilev Date: Fri Oct 21 15:30:30 2016 New Revision: 284877 URL: http://llvm.org/viewvc/llvm-project?rev=284877&view=rev Log: Remove accidentally checked in assert. Thanks to Manman for spotting this. Modified: cfe/trunk/lib/Sema/SemaDecl.cpp Modified: cfe/trunk/lib/Sema/SemaDecl.

Re: r284577 - [modules] Do not report missing definitions of demoted constexpr variable templates.

2016-10-21 Thread Vassil Vassilev via cfe-commits
On 21/10/16 00:19, Manman wrote: On Oct 19, 2016, at 4:19 AM, Vassil Vassilev via cfe-commits wrote: Author: vvassilev Date: Wed Oct 19 06:19:30 2016 New Revision: 284577 URL: http://llvm.org/viewvc/llvm-project?rev=284577&view=rev Log: [modules] Do not report missing definitions of demoted c

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. > This patch changes the way we match target attributes of base template vs > attributes used in explicit instantiation or specialization so that only > explicitly specified attributes are considered. Another question about this: When we have something inside of the for

r284879 - Declare H and H new/delete.

2016-10-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Oct 21 15:34:05 2016 New Revision: 284879 URL: http://llvm.org/viewvc/llvm-project?rev=284879&view=rev Log: Declare H and H new/delete. Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp cfe/trunk/test/SemaCUDA/overloaded-delete.cu Modified: cfe/trunk/lib/Sema/SemaExprCXX

[libcxx] r284881 - [libcxx] Support std::regex_constants::match_not_null

2016-10-21 Thread Tim Shen via cfe-commits
Author: timshen Date: Fri Oct 21 15:41:47 2016 New Revision: 284881 URL: http://llvm.org/viewvc/llvm-project?rev=284881&view=rev Log: [libcxx] Support std::regex_constants::match_not_null Summary: Fixes PR21597. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: htt

[PATCH] D25595: [libcxx] Support std::regex_constants::match_not_null

2016-10-21 Thread Tim Shen via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284881: [libcxx] Support std::regex_constants::match_not_null (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D25595?vs=75186&id=75480#toc Repository: rL LLVM https://review

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Artem Belevich via cfe-commits
tra updated this revision to Diff 75482. tra added a comment. Added a comment explaining expected constexpr function template matching behavior. https://reviews.llvm.org/D25845 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cpp lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaTemplate.cpp

r284882 - [CUDA] Simplify some repeated diagnostic expectations in CUDA tests.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 15:50:47 2016 New Revision: 284882 URL: http://llvm.org/viewvc/llvm-project?rev=284882&view=rev Log: [CUDA] Simplify some repeated diagnostic expectations in CUDA tests. Instead of repeating the diagnostic, use "expected-note N". Test-only change. Modified: c

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Artem Belevich via cfe-commits
tra added a comment. In https://reviews.llvm.org/D25845#576819, @jlebar wrote: > > This patch changes the way we match target attributes of base template vs > > attributes used in explicit instantiation or specialization so that only > > explicitly specified attributes are considered. > > Anoth

[PATCH] D25363: [Sema] Store a SourceRange for multi-token builtin types

2016-10-21 Thread Malcolm Parsons via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284885: [Sema] Store a SourceRange for multi-token builtin types (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D25363?vs=74975&id=75485#toc Repository: rL LLVM htt

r284885 - [Sema] Store a SourceRange for multi-token builtin types

2016-10-21 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Fri Oct 21 16:13:56 2016 New Revision: 284885 URL: http://llvm.org/viewvc/llvm-project?rev=284885&view=rev Log: [Sema] Store a SourceRange for multi-token builtin types Summary: clang-tidy's modernize-use-auto check uses the SourceRange of a TypeLoc when replacing th

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. LGTM! https://reviews.llvm.org/D25876 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25876: [analyzer] Report CFNumberGetValue API misuse

2016-10-21 Thread Anna Zaks via cfe-commits
zaks.anna updated this revision to Diff 75488. zaks.anna added a comment. Address comments from Devin. https://reviews.llvm.org/D25876 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp test/Analysis/CFNumber.c Index: test/A

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Reid Kleckner via cfe-commits
rnk created this revision. rnk added reviewers: rsmith, rtrieu. rnk added a subscriber: cfe-commits. The code pattern used to implement the token rewriting hack doesn't interact well with token caching in the pre-processor. As a result, clang would crash on 'int f(::(id));' while doing a tenative

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-10-21 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 75493. pcc added a comment. Refresh https://reviews.llvm.org/D22296 Files: clang/include/clang/AST/VTableBuilder.h clang/lib/AST/VTableBuilder.cpp clang/lib/CodeGen/CGCXX.cpp clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGen/CGVTables.cpp clang/lib/Code

[PATCH] D24431: CodeGen: Start using inrange annotations on vtable getelementptr.

2016-10-21 Thread Peter Collingbourne via cfe-commits
pcc updated this revision to Diff 75494. pcc added a comment. Refresh https://reviews.llvm.org/D24431 Files: clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGen/ItaniumCXXABI.cpp clang/test/CodeGenCXX/const-init-cxx11.cpp clang/test/CodeGenCXX/constructor-init.cpp clang/test/CodeGenCXX/copy

r284887 - Switch SmallSetVector to use DenseSet when it overflows its inline space.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 16:45:01 2016 New Revision: 284887 URL: http://llvm.org/viewvc/llvm-project?rev=284887&view=rev Log: Switch SmallSetVector to use DenseSet when it overflows its inline space. Summary: SetVector already used DenseSet, but SmallSetVector used std::set. This leads to

[clang-tools-extra] r284888 - Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases

2016-10-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 21 16:50:28 2016 New Revision: 284888 URL: http://llvm.org/viewvc/llvm-project?rev=284888&view=rev Log: Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases it detects are ill-formed (some per C++ core issue 1512, others always have been). Rem

Re: r284800 - DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.

2016-10-21 Thread Richard Smith via cfe-commits
On Fri, Oct 21, 2016 at 1:13 AM, Renato Golin wrote: > On 21 October 2016 at 03:36, Richard Smith via cfe-commits > wrote: > > Author: rsmith > > Date: Thu Oct 20 21:36:37 2016 > > New Revision: 284800 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=284800&view=rev > > Log: > > DR583, DR151

r284890 - DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules.

2016-10-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 21 17:00:42 2016 New Revision: 284890 URL: http://llvm.org/viewvc/llvm-project?rev=284890&view=rev Log: DR583, DR1512: Implement a rewrite to C++'s 'composite pointer type' rules. This has two significant effects: 1) Direct relational comparisons between null pointer

[PATCH] D25838: [Fuchsia] Support for 32-bit architectures

2016-10-21 Thread Petr Hosek via cfe-commits
phosek retitled this revision from "[Fuchsia] Support for additional architectures" to "[Fuchsia] Support for 32-bit architectures". phosek updated the summary for this revision. phosek updated this revision to Diff 75496. Repository: rL LLVM https://reviews.llvm.org/D25838 Files: lib/Basic

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Richard Smith via cfe-commits
rsmith added a comment. Can you also remove the corresponding diagnostic? Comment at: lib/Parse/ParseExprCXX.cpp:73-75 PP.EnterToken(ColonToken); if (!AtDigraph) PP.EnterToken(DigraphToken); This seems to mess up the cached token buffer in the same w

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. To close the loop, we talked about this IRL, and I agree this is the most sane option we can come up with. The user-facing principle is that the signatures of function template specializations must match. We consider CUDA attributes to be part of the function's signatu

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Sema/Sema.h:9396 + CUDAFunctionTarget IdentifyCUDATarget(const FunctionDecl *D, +bool IgnoreImplicitHDAttr = false); CUDAFunctionTarget IdentifyCUDATarget(const AttributeList *Attr

[clang-tools-extra] r284894 - [Release notes] Mention removed Clang-tidy misc-pointer-and-integral-operation check

2016-10-21 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Fri Oct 21 17:35:58 2016 New Revision: 284894 URL: http://llvm.org/viewvc/llvm-project?rev=284894&view=rev Log: [Release notes] Mention removed Clang-tidy misc-pointer-and-integral-operation check Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified:

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:87 + + if ((HasHostAttr && HasDeviceAttr) || ForceCUDAHostDeviceDepth > 0) +return CFT_HostDevice; Checking ForceCUDAHostDeviceDepth here is...yeah. Especially because the other overload of th

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:73-75 PP.EnterToken(ColonToken); if (!AtDigraph) PP.EnterToken(DigraphToken); rsmith wrote: > This seems to mess up the cached token buffer in the same way; it's a little > surprising w

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/SemaCUDA/function-template-overload.cu:44 +// explicitly specialize or instantiate function tempaltes. +template <> __host__ HType overload_hd(int a); +// expected-error@-1 {{no function template matches function template specializa

r284895 - Remove unnecessary distinction between Ref_Compatible and

2016-10-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 21 18:01:55 2016 New Revision: 284895 URL: http://llvm.org/viewvc/llvm-project?rev=284895&view=rev Log: Remove unnecessary distinction between Ref_Compatible and Ref_Compatible_With_Added_Qualification. We always treated these two values the same way. Modified: cf

[PATCH] D25640: [CUDA] [AST] Allow isInlineDefinitionExternallyVisible to be called on functions without bodies.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Friendly ping. This assert breaks basically all cuda compilation on certain libstdc++ versions. If this change is wrong, I sort of urgently need to figure out the right thing. https://reviews.llvm.org/D25640 ___ cfe-commi

r284897 - Module: improve the diagnostic message for include of non-modular header.

2016-10-21 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Oct 21 18:27:37 2016 New Revision: 284897 URL: http://llvm.org/viewvc/llvm-project?rev=284897&view=rev Log: Module: improve the diagnostic message for include of non-modular header. Emit the actual path to the non-modular include. rdar://28897010 Modified: cfe/trunk/i

[PATCH] D25882: Remove special error recovery for ::(id)

2016-10-21 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 75509. rnk added a comment. - Remove unused diagnostic https://reviews.llvm.org/D25882 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h lib/Parse/ParseExprCXX.cpp test/Parser/colon-colon-parentheses.cpp Index: test/Parser

[PATCH] D25806: Module: correctly set the module file kind when emitting diagnostics for file_modified

2016-10-21 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284899: Module: correctly set the module file kind when emitting file_modified. (authored by mren). Changed prior to commit: https://reviews.llvm.org/D25806?vs=75326&id=75510#toc Repository: rL LLVM

r284899 - Module: correctly set the module file kind when emitting file_modified.

2016-10-21 Thread Manman Ren via cfe-commits
Author: mren Date: Fri Oct 21 18:35:03 2016 New Revision: 284899 URL: http://llvm.org/viewvc/llvm-project?rev=284899&view=rev Log: Module: correctly set the module file kind when emitting file_modified. rdar://28503343 Differential Revision: http://reviews.llvm.org/D25806 Added: cfe/trunk/t

[PATCH] D25888: Add support for __builtin_os_log_format[_buffer_size]

2016-10-21 Thread Mehdi AMINI via cfe-commits
mehdi_amini created this revision. mehdi_amini added a reviewer: bkramer. mehdi_amini added a subscriber: cfe-commits. Herald added subscribers: modocache, mgorny, beanz. These new builtins support a mechanism for logging OS events, using a printf-like format string to specify the layout of data i

[PATCH] D25206: [Parser] Correct typo after lambda capture initializer is parsed

2016-10-21 Thread Akira Hatanaka via cfe-commits
ahatanak added a comment. ping https://reviews.llvm.org/D25206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   >