r257251 - [modules] If we're treating an elaborated-type-specifier as if it introduces a

2016-01-08 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Jan 9 00:58:48 2016 New Revision: 257251 URL: http://llvm.org/viewvc/llvm-project?rev=257251&view=rev Log: [modules] If we're treating an elaborated-type-specifier as if it introduces a tag (because the previous declaration was found in a different module), inject the tag

Re: r256907 - [modules] When a tag type that was imported from a module is referenced via an

2016-01-08 Thread Richard Smith via cfe-commits
tal error: > could not build module 'LLVM_Utils' > #include "llvm/Support/ARMBuildAttributes.h" > ^~~ > 5 errors generated. > > Reverting r256907 just works for me. Lemme know if you would like more > information. >

r257403 - When a tag is declared in prototype scope in C, if we've decided that it

2016-01-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jan 11 16:41:53 2016 New Revision: 257403 URL: http://llvm.org/viewvc/llvm-project?rev=257403&view=rev Log: When a tag is declared in prototype scope in C, if we've decided that it redeclares an existing tag but are creating a new declaration anyway (because it has attribu

Re: [PATCH] D15862: A possible direction for fixing https://llvm.org/bugs/show_bug.cgi?id=25973.

2016-01-12 Thread Richard Smith via cfe-commits
rsmith added a comment. Would this be expected to degrade performance for people building with -fno-exceptions who use iterators with non-noexcept operations (such as LLVM and Clang)? http://reviews.llvm.org/D15862 ___ cfe-commits mailing list cfe

Re: [PATCH] D15862: A possible direction for fixing https://llvm.org/bugs/show_bug.cgi?id=25973.

2016-01-12 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/iterator:442 @@ +441,3 @@ +struct __is_exactly_input_iterator +: public integral_constant::iterator_category, input_iterator_tag>::value> {}; + Is it permitted for people to derive their own tag types from inp

r257512 - [modules] Don't diagnose a conflict between two using-declarations that name equivalent internal linkage entities.

2016-01-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jan 12 14:34:32 2016 New Revision: 257512 URL: http://llvm.org/viewvc/llvm-project?rev=257512&view=rev Log: [modules] Don't diagnose a conflict between two using-declarations that name equivalent internal linkage entities. Added: cfe/trunk/test/Modules/Inputs/using-d

r257529 - Improve AST dumping:

2016-01-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Jan 12 15:59:26 2016 New Revision: 257529 URL: http://llvm.org/viewvc/llvm-project?rev=257529&view=rev Log: Improve AST dumping: 1) When dumping a declaration that declares a name for a type, also dump the named type. 2) Add a #pragma clang __debug dump X, that dumps t

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2016-01-12 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/CodeGen/CGExprScalar.cpp:816-817 @@ +815,4 @@ +// the same as the vector's element type (sans qualifiers) +assert(DstType->castAs()->getElementType().getTypePtr() == +

Re: [PATCH] D15861: Support fully-qualified names for all QualTypes

2016-01-13 Thread Richard Smith via cfe-commits
On Fri, Jan 8, 2016 at 1:54 PM, Philippe Canal wrote: > Hi Richard, > > In our use (Persistency of C++ objects, including the (meta)description of > their data content as well as use the name as key to access the class' > reflection information at run-time), the 'context' is indeed always the "at

Re: [PATCH] D15861: Support fully-qualified names for all QualTypes

2016-01-13 Thread Richard Smith via cfe-commits
rsmith added a comment. I think this functionality can be provided more simply by adding another flag to `PrintingPolicy` to request fully-qualified names always be produced. It already usually provides fully-qualified names; the only notable exception I can see is that if a qualifier was alrea

Re: [PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-01-13 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/Builtins.h:216-219 @@ -215,3 +215,6 @@ /// \brief This names the __make_integer_seq BuiltinTemplateDecl. BTK__make_integer_seq + + /// \brief This names the __nth_element BuiltinTemplateDecl. + , BTK__nth_elemen

Re: [PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-01-13 Thread Richard Smith via cfe-commits
rsmith added a comment. Bikeshedding on the name a bit... how about `__type_pack_element`? http://reviews.llvm.org/D15421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-01-13 Thread Richard Smith via cfe-commits
On Wed, Jan 13, 2016 at 2:31 PM, Nathan Wilson wrote: > nwilson added a comment. > > In http://reviews.llvm.org/D15421#326144, @rsmith wrote: > > > Bikeshedding on the name a bit... how about `__type_pack_element`? > > Hmm, I kind of felt like having `nth` in there implied we're indexing into > s

Re: r257652 - Update cxx_dr_status.html after the 3.8 branch

2016-01-13 Thread Richard Smith via cfe-commits
The right way to update this file is to change the www/make_cxx_dr_status script and then rerun it. (It expects to find a copy of the cwg_index.html page from the wg21 website in the current directory.) Done in r257695. On Wed, Jan 13, 2016 at 11:20 AM, Hans Wennborg wrote: > Richard, can you ch

r257695 - Update make_cxx_dr_status after the 3.8 branch.

2016-01-13 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jan 13 16:51:59 2016 New Revision: 257695 URL: http://llvm.org/viewvc/llvm-project?rev=257695&view=rev Log: Update make_cxx_dr_status after the 3.8 branch. Modified: cfe/trunk/www/make_cxx_dr_status Modified: cfe/trunk/www/make_cxx_dr_status URL: http://llvm.org/vie

Re: [PATCH] D16159: [Sema] Fix PR26085 -- regression caused by making overload resolution more lenient in C.

2016-01-13 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D16159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs

2016-01-13 Thread Richard Smith via cfe-commits
On Wed, Jan 13, 2016 at 3:41 PM, Arthur O'Dwyer via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Following Louis' suggestion, how about __pack_nth? > Maybe just __pack_element, to mirror its intended use to implement things like tuple_element? (I'm not completely happy about using this gene

Re: [PATCH] D15866: Warn when using `defined` in a macro definition.

2016-01-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/Lex/PPExpressions.cpp:104-105 @@ +103,4 @@ + // #else branch. Emit a warning about this undefined behavior. + if (beginLoc.isMacroID()) +PP.Diag(beginLoc, diag::warn_defined_in_m

Re: [PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.

2016-01-14 Thread Richard Smith via cfe-commits
rsmith added a comment. I think you missed this from my previous review: > This should be checked and diagnosed in Sema, not in CodeGen. Comment at: lib/CodeGen/CGDeclCXX.cpp:333-337 @@ +332,7 @@ + [](const CXXMethodDecl *Method) { return Method->isVirtual(); })) +

Re: [PATCH] D15858: Warn undeclared identifiers in CUDA kernel calls

2016-01-14 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. LGTM, thanks! Comment at: test/SemaCUDA/cxx11-kernel-call.cu:8 @@ +7,3 @@ +template void k1Wrapper() { + void (*f)() = [] { k1<<>>(); }; // expected-error {{initializer contains unexpanded

r257863 - When copying whitespace flags from the token naming a macro argument onto the

2016-01-14 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 14 21:24:18 2016 New Revision: 257863 URL: http://llvm.org/viewvc/llvm-project?rev=257863&view=rev Log: When copying whitespace flags from the token naming a macro argument onto the first token of the expansion, don't forget to copy the "is at the start of a line" toke

Re: [PATCH] D16216: Fix infinite loop when ::new or ::delete are found in member initializer list

2016-01-15 Thread Richard Smith via cfe-commits
rsmith added a comment. This isn't quite the right way to fix this issue. Comment at: lib/Parse/ParseDeclCXX.cpp:3206-3209 @@ -3205,6 +3205,6 @@ // we're just missing a comma. else if (Tok.isOneOf(tok::identifier, tok::coloncolon)) { SourceLocation Loc = PP.getL

Re: [PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.

2016-01-15 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:312 @@ +311,3 @@ + // the checks have been done in Sema by now. Whatever initializers + // areallowed are empty and we just need to ignore them here. + if (getLangOpts().CUDA && getLangOpts().CUDAIsDevice && --

Re: [PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.

2016-01-15 Thread Richard Smith via cfe-commits
On Fri, Jan 15, 2016 at 4:22 PM, Artem Belevich wrote: > tra added inline comments. > > > Comment at: lib/CodeGen/CodeGenModule.cpp:2334 > @@ -2339,1 +2333,3 @@ > + D->hasAttr()) > Init = llvm::UndefValue::get(getTypes().ConvertType(ASTTy)); > + else if (!InitExpr) { >

Re: [PATCH] D15305: [CUDA] Do not allow dynamic initialization of global device side variables.

2016-01-15 Thread Richard Smith via cfe-commits
On Fri, Jan 15, 2016 at 5:29 PM, Richard Smith wrote: > On Fri, Jan 15, 2016 at 4:22 PM, Artem Belevich wrote: >> tra added inline comments. >> >> >> Comment at: lib/CodeGen/CodeGenModule.cpp:2334 >> @@ -2339,1 +2333,3 @@ >> + D->hasAttr()) >> Init = llvm::UndefValue::g

Fwd: Re: [PATCH][Modules][PR26179]

2016-01-18 Thread Richard Smith via cfe-commits
+ // the when comparing #1 and #2 we should go through their elements types. Typo "the when" + QualType VarXTy = VarX->getType(); + QualType VarYTy = VarY->getType(); + if (VarXTy->isIncompleteArrayType() || VarYTy->isIncompleteArrayType()) +return C.hasSameType(C.getA

Re: [PATCH][Modules][PR26179]

2016-01-18 Thread Richard Smith via cfe-commits
LGTM On Jan 18, 2016 12:06 PM, "Vassil Vassilev" wrote: > Attaching v3 of the patch. Added your case to the current test and fixed > my silly non-array mistake. > -- Vassil > On 18/01/16 20:38, Richard Smith wrote: > > Please also add a test case that your old patch would have failed on, such > a

Re: [PATCH] D15173: [Preprocessor] Fix assertion in AnnotatePreviousCachedTokens

2016-01-18 Thread Richard Smith via cfe-commits
On Jan 7, 2016 7:13 PM, "Bruno Cardoso Lopes" wrote: > > bruno updated this revision to Diff 44306. > bruno added a comment. > > Hi Richard, > > Thanks for the detailed explanation, it now makes sense to me. I updated the patch with another approach! Let me know if it's the right direction. > > >

Re: [PATCH] D16216: Fix infinite loop when ::new or ::delete are found in member initializer list

2016-01-19 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks! Do you need someone to commit for you? http://reviews.llvm.org/D16216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

Re: [PATCH] D16438: Fix printing of nested variable declarations with suppressed tags

2016-01-21 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/StmtPrinter.cpp:132 @@ -131,2 +131,3 @@ SubPolicy.SuppressSpecifiers = false; + SubPolicy.SuppressTag = false; Decl::printGroup(Decls.data(), Decls.size(), OS, SubPolicy, IndentLevel); Maybe we should instea

Re: [PATCH] D16438: Fix printing of types in initializers with suppressed tags.

2016-01-23 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks! Do you have SVN commit access? http://reviews.llvm.org/D16438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.

Re: r257947 - Avoid self-assignment of SmallString, trigger UB behavior down the road.

2016-01-24 Thread Richard Smith via cfe-commits
Approved for branch. On 23 Jan 2016 11:56 p.m., "Joerg Sonnenberger" wrote: > On Sat, Jan 16, 2016 at 03:51:11PM +0100, Joerg Sonnenberger via > cfe-commits wrote: > > Hello Richard, > > can this be merged into 3.8? It creates some trivial noise under > > valgrind. > > Ping? > > Joerg > _

Re: [PATCH] D16365: Do not define GXX_RTTI macro for C

2016-01-26 Thread Richard Smith via cfe-commits
LGTM, assuming this is the same behaviour as GCC. On 26 Jan 2016 1:59 a.m., "Yunzhong Gao" wrote: > ygao added a comment. > > A gentle ping. > > > http://reviews.llvm.org/D16365 > > > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: [PATCH] D16365: Do not define GXX_RTTI macro for C

2016-01-26 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. LGTM, assuming this is the same behaviour as GCC. http://reviews.llvm.org/D16365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D16012: Carry raw string literal information through to the AST StringLiteral representation

2016-01-27 Thread Richard Smith via cfe-commits
What's the benefit of storing this? You can get the same effect by re-lexing. We don't guarantee that the pretty printed version of the AST comprises the same sequence of tokens in general. On 27 Jan 2016 3:03 p.m., "Aaron Ballman via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > aaron.ballm

Re: r259192 - Implement TemplateArgument::dump() method for debugging, patterned after TemplateName::dump().

2016-01-29 Thread Richard Smith via cfe-commits
On 29 Jan 2016 5:50 a.m., "Yaron Keren via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > Author: yrnkrn > Date: Fri Jan 29 07:46:15 2016 > New Revision: 259192 > > URL: http://llvm.org/viewvc/llvm-project?rev=259192&view=rev > Log: > Implement TemplateArgument::dump() method for debugging,

Re: r259192 - Implement TemplateArgument::dump() method for debugging, patterned after TemplateName::dump().

2016-01-29 Thread Richard Smith via cfe-commits
On Fri, Jan 29, 2016 at 11:13 AM, Yaron Keren wrote: > OK. There are more un-annotated dump() methods such as > TemplateName::dump(), NestedNameSpecifier::dump(), ASTReader::dump(), > ModuleMap::dump(), MacroInfo::dump(), ... > > Annotate all dump() methods LLVM_DUMP_METHOD ? SGTM > 2016-01-29

r252955 - Additional tests from r252690 that I forgot to 'svn add'.

2015-11-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 12 15:42:39 2015 New Revision: 252955 URL: http://llvm.org/viewvc/llvm-project?rev=252955&view=rev Log: Additional tests from r252690 that I forgot to 'svn add'. From a patch by Nicholas Allegra! Added: cfe/trunk/test/Sema/auto-type.c cfe/trunk/test/SemaCXX/a

r252957 - Revert r240335.

2015-11-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 12 15:55:58 2015 New Revision: 252957 URL: http://llvm.org/viewvc/llvm-project?rev=252957&view=rev Log: Revert r240335. This failed to solve the problem it was aimed at, and introduced just as many issues as it resolved. Realistically, we need to deal with the possibi

r252959 - DR407: Rationalize how we handle tags being hidden by typedefs. Even with

2015-11-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 12 16:04:34 2015 New Revision: 252959 URL: http://llvm.org/viewvc/llvm-project?rev=252959&view=rev Log: DR407: Rationalize how we handle tags being hidden by typedefs. Even with DR407, the C++ standard doesn't really say how this should work. Here's what we do (which i

r252960 - [modules] Simplify and generalize the existing rule for finding hidden

2015-11-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 12 16:19:45 2015 New Revision: 252960 URL: http://llvm.org/viewvc/llvm-project?rev=252960&view=rev Log: [modules] Simplify and generalize the existing rule for finding hidden declarations in redeclaration lookup. A declaration is now visible to lookup if: * It is vis

r252967 - Avoid duplicated diagnostic when lookup for a nested-name-specifier fails due to ambiguity.

2015-11-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 12 16:40:09 2015 New Revision: 252967 URL: http://llvm.org/viewvc/llvm-project?rev=252967&view=rev Log: Avoid duplicated diagnostic when lookup for a nested-name-specifier fails due to ambiguity. Modified: cfe/trunk/lib/Sema/SemaCXXScopeSpec.cpp cfe/trunk/tes

Re: [PATCH] D12359: New warning -Wnonconst-parameter when a pointer parameter can be const

2015-11-12 Thread Richard Smith via cfe-commits
On Wed, Nov 11, 2015 at 10:11 PM, Daniel Marjamäki < daniel.marjam...@evidente.se> wrote: > danielmarjamaki added a comment. > > In http://reviews.llvm.org/D12359#287522, @rsmith wrote: > > > Why does this construct justify the compiler emitting a warning? It > seems to be reporting a fact about t

r253010 - [modules] Follow the C++ standard's rule for linkage of enumerators: they have

2015-11-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 12 21:52:13 2015 New Revision: 253010 URL: http://llvm.org/viewvc/llvm-project?rev=253010&view=rev Log: [modules] Follow the C++ standard's rule for linkage of enumerators: they have the linkage of the enumeration. For enumerators of unnamed enumerations, extend the -W

r253012 - [modules] When a declaration has non-trivial visibility, check whether it's

2015-11-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 12 23:14:45 2015 New Revision: 253012 URL: http://llvm.org/viewvc/llvm-project?rev=253012&view=rev Log: [modules] When a declaration has non-trivial visibility, check whether it's actually hidden before we check its linkage. This avoids computing the linkage "too early

Re: [PATCH] Allow "redefinition" of typedef of anon tag from unimported submodule

2015-11-13 Thread Richard Smith via cfe-commits
On Fri, Nov 13, 2015 at 4:03 PM, Ben Langmuir via cfe-commits < cfe-commits@lists.llvm.org> wrote: > This time sending to the right list address. Likewise =) > On Nov 13, 2015, at 4:00 PM, Ben Langmuir wrote: > > > > Hey Richard, > > > > After your commit r233345 we started diagnosing “redefin

Re: r253012 - [modules] When a declaration has non-trivial visibility, check whether it's

2015-11-14 Thread Richard Smith via cfe-commits
On Nov 13, 2015 7:23 PM, "Sean Silva" wrote: > > > > On Thu, Nov 12, 2015 at 9:14 PM, Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: >> >> Author: rsmith >> Date: Thu Nov 12 23:14:45 2015 >> New Revision: 253012 >> &

Re: [PATCH] D14506: Porting shouldVisitImplicitCode to DataRecursiveASTVisitor.

2015-11-16 Thread Richard Smith via cfe-commits
Rather than trying to maintain the horrible duplication between DataRecursiveASTVisitor and RecursiveASTVisitor, can we just delete DataRecursiveASTVisitor? RecursiveASTVisitor is data-recursive too these days (and has a smarter implementation than DataRecursiveASTVisitor's from what I can see), bu

Re: Lit test C++11 Compatibility Patch #4

2015-11-16 Thread Richard Smith via cfe-commits
On Mon, Nov 16, 2015 at 5:17 PM, Li, Charles < charles...@playstation.sony.com> wrote: > Hi Everyone, > > > > Here is the forth Lit tests C++11 compatibility patch. > > This patch mainly added new diagnostics expected for C++11. > > There are 34 tests in total. They fall into 3 categories. > > > >

r253283 - [modules] Fix some more cases where we used to reject a conflict between two

2015-11-16 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 16 21:02:41 2015 New Revision: 253283 URL: http://llvm.org/viewvc/llvm-project?rev=253283&view=rev Log: [modules] Fix some more cases where we used to reject a conflict between two declarations that are not simultaneously visible, and where at least one of them has int

Re: r253012 - [modules] When a declaration has non-trivial visibility, check whether it's

2015-11-16 Thread Richard Smith via cfe-commits
On Mon, Nov 16, 2015 at 7:00 PM, Sean Silva wrote: > On Sat, Nov 14, 2015 at 2:30 PM, Richard Smith > wrote: > >> On Nov 13, 2015 7:23 PM, "Sean Silva" wrote: >> > >> > >> > >> > On Thu, Nov 12, 2015 at 9:14 PM, Richard

Re: [PATCH] D14506: Porting shouldVisitImplicitCode to DataRecursiveASTVisitor.

2015-11-17 Thread Richard Smith via cfe-commits
LOn Nov 17, 2015 12:49 AM, "Manuel Klimek" wrote: > Richard, this is still optional, right? (the AST matchers need to control visitation) This doesn't change RAV semantics at all (or if it does, it's a bug). If any of the extension points are overridden in the derived class, data recursion is aut

r253398 - [modules] When a #include is mapped to a module import and appears somewhere

2015-11-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 17 17:32:01 2015 New Revision: 253398 URL: http://llvm.org/viewvc/llvm-project?rev=253398&view=rev Log: [modules] When a #include is mapped to a module import and appears somewhere other than the top level, we issue an error. This breaks a fair amount of C++ code wrapp

Re: r253398 - [modules] When a #include is mapped to a module import and appears somewhere

2015-11-17 Thread Richard Smith via cfe-commits
On Tue, Nov 17, 2015 at 3:40 PM, David Blaikie wrote: > On Tue, Nov 17, 2015 at 3:32 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Tue Nov 17 17:32:01 2015 >> New Revision: 253398 >> >> URL: h

r253420 - Don't expose iterators into the list of types on the ASTContext; these are

2015-11-17 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 17 19:19:02 2015 New Revision: 253420 URL: http://llvm.org/viewvc/llvm-project?rev=253420&view=rev Log: Don't expose iterators into the list of types on the ASTContext; these are unsafe, since many operations on the types can trigger lazy deserialization of more types

Re: [PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

2015-11-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7659 @@ +7658,3 @@ +Diag(D.getDeclSpec().getConceptSpecLoc(), + diag::err_concept_specified_specialization) << 1; + } hubert.reinterpretcast wrote: > nwilson wrote: > > hubert

Re: [PATCH] D13263: Addition of __attribute__((pass_object_size)) to Clang

2015-11-18 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Expr.h:631-634 @@ -630,1 +630,6 @@ + /// \brief If the current Expr is either a pointer, this will try to + /// statically determine the number of bytes available where the pointer is + /// pointing. Returns true if

r253535 - [coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_traits.

2015-11-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 18 20:36:35 2015 New Revision: 253535 URL: http://llvm.org/viewvc/llvm-project?rev=253535&view=rev Log: [coroutines] Tweak diagnostics to always use fully-qualified name for std::coroutine_traits. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

r253641 - [coroutines] Per latest wording paper, co_* are no longer permitted in any

2015-11-19 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Nov 19 20:54:01 2015 New Revision: 253641 URL: http://llvm.org/viewvc/llvm-project?rev=253641&view=rev Log: [coroutines] Per latest wording paper, co_* are no longer permitted in any unevaluated operands. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

r253725 - [coroutines] Synthesize yield_value call for co_yield.

2015-11-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 20 16:40:06 2015 New Revision: 253725 URL: http://llvm.org/viewvc/llvm-project?rev=253725&view=rev Log: [coroutines] Synthesize yield_value call for co_yield. Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp cfe/trunk/test/SemaCXX/coroutines.cpp Modified: cfe/t

r253726 - [coroutines] Support braced-init-list as operand of co_yield expression.

2015-11-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 20 16:47:10 2015 New Revision: 253726 URL: http://llvm.org/viewvc/llvm-project?rev=253726&view=rev Log: [coroutines] Support braced-init-list as operand of co_yield expression. Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp cfe/trunk/test/SemaCXX/coroutines.cp

r253731 - [coroutines] Better handling of placeholder types.

2015-11-20 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Nov 20 16:57:24 2015 New Revision: 253731 URL: http://llvm.org/viewvc/llvm-project?rev=253731&view=rev Log: [coroutines] Better handling of placeholder types. Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp cfe/trunk/test/SemaCXX/coroutines.cpp Modified: cfe/trunk

Re: [PATCH] D14877: Fix ICE on lowering of constexpr vector splats

2015-11-21 Thread Richard Smith via cfe-commits
It would seem cleaner to build an ImplicitCastExpr node in Sema between the operand and the splat node. On Nov 20, 2015 11:04 AM, "George Burgess IV" wrote: > george.burgess.iv created this revision. > george.burgess.iv added a reviewer: rsmith. > george.burgess.iv added a subscriber: cfe-commits

r253811 - [coroutines] Factor out co_await representation into common base class for co_await and co_yield, and use it to hold await_* calls.

2015-11-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Nov 21 20:57:17 2015 New Revision: 253811 URL: http://llvm.org/viewvc/llvm-project?rev=253811&view=rev Log: [coroutines] Factor out co_await representation into common base class for co_await and co_yield, and use it to hold await_* calls. Modified: cfe/trunk/include

r253812 - [coroutines] Materialize the awaitable before generating the await_* calls.

2015-11-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sat Nov 21 21:13:02 2015 New Revision: 253812 URL: http://llvm.org/viewvc/llvm-project?rev=253812&view=rev Log: [coroutines] Materialize the awaitable before generating the await_* calls. Modified: cfe/trunk/lib/Sema/SemaCoroutine.cpp Modified: cfe/trunk/lib/Sema/SemaCor

r253816 - [coroutines] Build implicit return_value / return_void calls for co_return.

2015-11-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Nov 22 01:05:16 2015 New Revision: 253816 URL: http://llvm.org/viewvc/llvm-project?rev=253816&view=rev Log: [coroutines] Build implicit return_value / return_void calls for co_return. Modified: cfe/trunk/include/clang/AST/StmtCXX.h cfe/trunk/lib/Sema/SemaCoroutine

r253817 - [coroutines] Check for overload sets in co_yield / co_return operands being resolved by a call to yield_value / return_value before rejecting them.

2015-11-21 Thread Richard Smith via cfe-commits
Author: rsmith Date: Sun Nov 22 01:33:28 2015 New Revision: 253817 URL: http://llvm.org/viewvc/llvm-project?rev=253817&view=rev Log: [coroutines] Check for overload sets in co_yield / co_return operands being resolved by a call to yield_value / return_value before rejecting them. Modified: c

r253946 - [coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, and form the initial_suspend, final_suspend, and get_return_object calls.

2015-11-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 23 20:34:39 2015 New Revision: 253946 URL: http://llvm.org/viewvc/llvm-project?rev=253946&view=rev Log: [coroutines] Build a CoroutineBodyStmt when finishing parsing a coroutine, and form the initial_suspend, final_suspend, and get_return_object calls. Modified:

Re: [libcxx] Reinstate and fix overload sets to be const-correct wherever possible

2015-11-23 Thread Richard Smith via cfe-commits
Ping. On Thu, Nov 5, 2015 at 6:32 PM, Richard Smith wrote: > Ping. > > On Thu, Oct 29, 2015 at 5:21 PM, Richard Smith > wrote: > >> Hi, >> >> The attached patch undoes the revert of r249929, and adds an extension to >> allow (and ) to work properly even in environments such >> as iOS where the

r253949 - Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's just an alias for RecursiveASTVisitor.

2015-11-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 23 21:55:01 2015 New Revision: 253949 URL: http://llvm.org/viewvc/llvm-project?rev=253949&view=rev Log: Remove DataRecursiveASTVisitor; it no longer serves any purpose, since it's just an alias for RecursiveASTVisitor. Removed: cfe/trunk/include/clang/AST/DataRec

r253950 - [modules] Add -cc1 flag -fmodules-embed-all-files.

2015-11-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 23 22:22:21 2015 New Revision: 253950 URL: http://llvm.org/viewvc/llvm-project?rev=253950&view=rev Log: [modules] Add -cc1 flag -fmodules-embed-all-files. This flag causes all files that were read by the compilation to be embedded into a produced module file. This is

r253958 - Reduce the stack usage per recursive step when RecursiveASTVisitor cannot perform data recursion.

2015-11-23 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 24 01:13:06 2015 New Revision: 253958 URL: http://llvm.org/viewvc/llvm-project?rev=253958&view=rev Log: Reduce the stack usage per recursive step when RecursiveASTVisitor cannot perform data recursion. Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h

r254041 - Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it,

2015-11-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 24 17:50:47 2015 New Revision: 254041 URL: http://llvm.org/viewvc/llvm-project?rev=254041&view=rev Log: Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it, to allow them to explicitly opt into data recursion despite having overridden Travers

Re: r253958 - Reduce the stack usage per recursive step when RecursiveASTVisitor cannot perform data recursion.

2015-11-24 Thread Richard Smith via cfe-commits
ncreases the stack usage, so do you think there's more to fix here, > or we should just disable the test under ASan? > I think this should work even under ASan conditions; fixed in r254041. > On Mon, Nov 23, 2015 at 11:13 PM, Richard Smith via cfe-commits < > cfe-commits@list

r254053 - Fix typo that was being SFINAE'd away (and apparently GCC 4.7.2 rejects-valid on this).

2015-11-24 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Nov 24 20:41:42 2015 New Revision: 254053 URL: http://llvm.org/viewvc/llvm-project?rev=254053&view=rev Log: Fix typo that was being SFINAE'd away (and apparently GCC 4.7.2 rejects-valid on this). Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Modified:

Re: r254041 - Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it,

2015-11-24 Thread Richard Smith via cfe-commits
/sanitizer-x86_64-linux-autoconf/builds/12237 > > On Tue, Nov 24, 2015 at 3:50 PM, Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Tue Nov 24 17:50:47 2015 >> New Revision: 254041 >> >> URL: http://llvm.or

r254083 - Stop using SFINAE to detect whether a derived-class override of Traverse* can

2015-11-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 25 13:33:20 2015 New Revision: 254083 URL: http://llvm.org/viewvc/llvm-project?rev=254083&view=rev Log: Stop using SFINAE to detect whether a derived-class override of Traverse* can take a queue; some supported versions of GCC believe that this substitution failure is

r254097 - P0001R1: 'register' storage class specifier is no longer permitted in C++1z.

2015-11-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 25 15:34:21 2015 New Revision: 254097 URL: http://llvm.org/viewvc/llvm-project?rev=254097&view=rev Log: P0001R1: 'register' storage class specifier is no longer permitted in C++1z. We will still allow it in system headers, in macros from system headers, when combined

Re: [PATCH] D14872: PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type

2015-11-25 Thread Richard Smith via cfe-commits
On Nov 25, 2015 1:53 PM, "hfin...@anl.gov via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > > hfinkel added inline comments. > > > Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2783 > @@ -2783,1 +2782,3 @@ > + "the newer semantic is provided here">, > + InGroup>; >

Re: r254041 - Teach RAV to pass its DataRecursionQueue to derived classes if they ask for it,

2015-11-25 Thread Richard Smith via cfe-commits
ks like we can't compile Clang itself after this change (with >>> GCC): >>> >>> >>> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/12237 >>> >>> On Tue, Nov 24, 2015 at 3:50 PM, Richard Smith via cfe-commits < >>

Re: [PATCH] D13980: Add "x87" in x86 target feature map

2015-11-25 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Targets.cpp:2548 @@ +2547,3 @@ + // All X86 processors but i386 have X87. + if (Kind != CK_i386) +setFeatureEnabledImpl(Features, "x87", true); What about `CK_Generic`? Also, if `CK_i486` can be used for th

r254121 - [modules] Refactor handling of -fmodules-embed-*. Track this properly rather

2015-11-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 25 20:04:16 2015 New Revision: 254121 URL: http://llvm.org/viewvc/llvm-project?rev=254121&view=rev Log: [modules] Refactor handling of -fmodules-embed-*. Track this properly rather than reusing the "overridden buffer" mechanism. This will allow us to make embedded file

r254122 - P0002R1: increment on expressions of type bool is no longer allowed in C++1z.

2015-11-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 25 20:16:37 2015 New Revision: 254122 URL: http://llvm.org/viewvc/llvm-project?rev=254122&view=rev Log: P0002R1: increment on expressions of type bool is no longer allowed in C++1z. Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td cfe/trunk/include/

r254123 - Update reference to final TM TS spec.

2015-11-25 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Nov 25 20:23:21 2015 New Revision: 254123 URL: http://llvm.org/viewvc/llvm-project?rev=254123&view=rev Log: Update reference to final TM TS spec. Modified: cfe/trunk/www/cxx_status.html Modified: cfe/trunk/www/cxx_status.html URL: http://llvm.org/viewvc/llvm-project

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-11-30 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. GCC's behavior (`aligned` on a field specifies the alignment of the start of that field) makes a little more sense to me than Clang's behavior (the type and alignment of a field specify a flavour of storage unit, and the field goes in t

Re: [PATCH] D13980: Add "x87" in x86 target feature map

2015-11-30 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/Targets.cpp:2548 @@ +2547,3 @@ + // All X86 processors but i386 have X87. + if (Kind != CK_i386) +setFeatureEnabledImpl(Features, "x87", true); aturetsk wrote: > rsmith wrote: > > What about `CK_Generic`? A

Re: [PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

2015-11-30 Thread Richard Smith via cfe-commits
On Mon, Nov 30, 2015 at 11:33 AM, John McCall wrote: > rjmccall added a comment. > > In http://reviews.llvm.org/D14980#298754, @rsmith wrote: > > > GCC's behavior (`aligned` on a field specifies the alignment of the > start of that field) makes a little more sense to me than Clang's behavior > (t

r254359 - Fix use-after-free when a C++ thread_local variable gets replaced (because its

2015-11-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 30 19:10:48 2015 New Revision: 254359 URL: http://llvm.org/viewvc/llvm-project?rev=254359&view=rev Log: Fix use-after-free when a C++ thread_local variable gets replaced (because its type changes when the initializer is attached). Don't hold onto the GlobalVariable*; r

Re: [PATCH] D15095: Accept "-Weverything" in pragma clang diagnostic ...

2015-11-30 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/Basic/Diagnostic.cpp:251-257 @@ -250,2 +250,9 @@ SourceLocation Loc) { + // Special handling for pragma clang diagnostic ... "-Weverything" + // There is no formal group named "everyt

r254365 - [modules] Don't reject multiple modules providing contents for the same embedded file.

2015-11-30 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Nov 30 21:32:49 2015 New Revision: 254365 URL: http://llvm.org/viewvc/llvm-project?rev=254365&view=rev Log: [modules] Don't reject multiple modules providing contents for the same embedded file. Added: cfe/trunk/test/Modules/embed-files.cpp Modified: cfe/trunk/li

Re: [PATCH] D13263: Addition of __attribute__((pass_object_size)) to Clang

2015-12-01 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. OK, a couple of trivial changes then I think this is fine to commit. Comment at: include/clang/Basic/AttrDocs.td:351-355 @@ +350,7 @@ + +* Only one use of ``pass_object_size``

Re: r254423 - It appears that this horrible mutating copy constructor is unused. Kill it with fire.

2015-12-01 Thread Richard Smith via cfe-commits
On Tue, Dec 1, 2015 at 3:42 PM, Duncan P. N. Exon Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > > On 2015-Dec-01, at 09:15, Aaron Ballman via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > > > Author: aaronballman > > Date: Tue Dec 1 11:15:13 2015 > > New Revision: 254423

Re: [PATCH] D15121: A new clang-tidy module to find calls to `std::swap`, and change them to use ADL

2015-12-01 Thread Richard Smith via cfe-commits
rsmith added a comment. In http://reviews.llvm.org/D15121#300033, @LegalizeAdulthood wrote: > I'm wondering if there isn't an existing module that would be a good fit for > this check. Why not in the modernize module? This isn't really modernization, it's a bug fix. ADL has always been the ri

Re: [PATCH] D13603: [Introduction] C++ Const object optimization in LLVM

2015-12-02 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. Your http://reviews.llvm.org/D14419 removes a lot of the code added here. Can you update this patch to not add that code? I'd prefer not to review the portion of this code that you're about to delete. Comment at: lib/C

Re: [PATCH] D13614: [Extension] Optimizing passed by-value const objects.

2015-12-02 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. This looks fine (subject to the observation in http://reviews.llvm.org/D13603 that `MarkWriteOnceWrittenRAII` can just be a f

Re: [PATCH] D13618: [Extension] Optimizing const member objects.

2015-12-02 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: lib/CodeGen/CGDecl.cpp:933 @@ +932,3 @@ + ASTContext &Ctx = getContext(); + auto &OffsetsInfo = InvariantOffsets.FindAndConstruct(Record).second; + OffsetsType &Args = OffsetsInfo.Offsets; Instead of tracking a sep

Re: [PATCH] D15169: [SemaCXX] Fix handling of C-style casts from void pointers to pointers in different address space.

2015-12-02 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaCast.cpp:1081-1083 @@ -1080,3 +1080,5 @@ } - Kind = CK_BitCast; + unsigned SrcAS = SrcPointee.getAddressSpace(); + unsigned DestAS = DestPointee.getAddressSpace(); + Kind = SrcAS

r254574 - PR17381: Treat undefined behavior during expression evaluation as an unmodeled

2015-12-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Dec 2 19:36:22 2015 New Revision: 254574 URL: http://llvm.org/viewvc/llvm-project?rev=254574&view=rev Log: PR17381: Treat undefined behavior during expression evaluation as an unmodeled side-effect, so that we don't allow speculative evaluation of such expressions during

r254663 - PR25731: namespace alias declarations can appear at block scope; ensure that we

2015-12-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Dec 3 17:24:04 2015 New Revision: 254663 URL: http://llvm.org/viewvc/llvm-project?rev=254663&view=rev Log: PR25731: namespace alias declarations can appear at block scope; ensure that we do scope-based lookup when looking for redeclarations of them. Add some related missi

Re: [PATCH] D15208: Patch for inline abort code generation

2015-12-03 Thread Richard Smith via cfe-commits
rsmith added a comment. I would expect that people who are using this for hardening would be upset about a 5% binary size increase. I'm OK with having this behind a flag, though. Repository: rL LLVM http://reviews.llvm.org/D15208 ___ cfe-commits

<    33   34   35   36   37   38   39   40   41   42   >