[cfe-commits] r108068 - /cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
Chris Lattner
clattner at apple.com
Sun Jul 11 08:52:48 PDT 2010
On Jul 11, 2010, at 2:29 AM, Argyrios Kyrtzidis wrote:
> How about adding to the FoldingSetImpl class:
>
> void InsertNode(Node *N);
>
> similar to GetOrInsertNode but with the addition of the assertion ?
Yeah, that sounds like a much cleaner solution!
-Chris
>
> -Argiris
>
> On Jul 11, 2010, at 4:24 AM, Chandler Carruth wrote:
>
>> Author: chandlerc
>> Date: Sat Jul 10 22:24:05 2010
>> New Revision: 108068
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=108068&view=rev
>> Log:
>> Mark assert-only variables as unused.
>>
>> Modified:
>> cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
>>
>> Modified: cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderDecl.cpp?rev=108068&r1=108067&r2=108068&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Frontend/PCHReaderDecl.cpp (original)
>> +++ cfe/trunk/lib/Frontend/PCHReaderDecl.cpp Sat Jul 10 22:24:05 2010
>> @@ -20,6 +20,7 @@
>> #include "clang/AST/DeclCXX.h"
>> #include "clang/AST/DeclTemplate.h"
>> #include "clang/AST/Expr.h"
>> +#include "llvm/Support/Compiler.h"
>> using namespace clang;
>>
>>
>> @@ -929,11 +930,11 @@
>> = cast<ClassTemplateDecl>(Reader.GetDecl(Record[Idx++]));
>> if (ClassTemplatePartialSpecializationDecl *Partial
>> = dyn_cast<ClassTemplatePartialSpecializationDecl>(D)) {
>> - ClassTemplatePartialSpecializationDecl *Inserted
>> + ClassTemplatePartialSpecializationDecl *Inserted ATTRIBUTE_UNUSED
>> = CanonPattern->getPartialSpecializations().GetOrInsertNode(Partial);
>> assert(Inserted == Partial && "Already inserted!");
>> } else {
>> - ClassTemplateSpecializationDecl *Inserted
>> + ClassTemplateSpecializationDecl *Inserted ATTRIBUTE_UNUSED
>> = CanonPattern->getSpecializations().GetOrInsertNode(D);
>> assert(Inserted == D && "Already inserted!");
>> }
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
More information about the cfe-commits
mailing list