hanchenye-llvm-project/clang/lib/AST
Richard Trieu 15b66535ca When checking the template argument list, use a copy of that list for changes
and only update the orginal list on a valid arugment list.  When checking an
individual expression template argument, and conversions are required, update
the expression in the template argument.  Since template arguments are
speculatively checked, the copying of the template argument list prevents
updating the template arguments when the list does not match the template.

Additionally, clean up the integer checking code in the template diffing code.
The code performs unneccessary conversions from APSInt to APInt.

Fixes PR21758.

This essentially reverts r224770 to recommits r224667 and r224668 with extra
changes to prevent the template instantiation problems seen in PR22006.
A test to catch the discovered problem is also added.

llvm-svn: 226983
2015-01-24 02:48:32 +00:00
..
APValue.cpp
ASTConsumer.cpp
ASTContext.cpp AST: Don't ignore alignas on EnumDecls when calculating alignment 2015-01-21 10:54:38 +00:00
ASTDiagnostic.cpp When checking the template argument list, use a copy of that list for changes 2015-01-24 02:48:32 +00:00
ASTDumper.cpp [modules] Sometimes we can deserialize a class member but not have yet 2015-01-24 01:07:20 +00:00
ASTImporter.cpp Rename RefersToCapturedVariable to RefersToEnclosingVariableOrCapture, NFC 2015-01-12 10:17:46 +00:00
ASTTypeTraits.cpp
AttrImpl.cpp
CMakeLists.txt
CXXABI.h
CXXInheritance.cpp
Comment.cpp
CommentBriefParser.cpp
CommentCommandTraits.cpp Fix for PR21254 - Assertion in comment parser 2014-10-15 16:18:20 +00:00
CommentLexer.cpp
CommentParser.cpp
CommentSema.cpp
Decl.cpp AST: Fix the linkage of static vars in fn template specializations 2014-12-16 04:52:14 +00:00
DeclBase.cpp Handle use of default member initializers before end of outermost class 2014-11-17 23:36:45 +00:00
DeclCXX.cpp DebugInfo: Correct the debug location of non-static data member initializers 2015-01-18 00:12:58 +00:00
DeclFriend.cpp
DeclGroup.cpp
DeclObjC.cpp ObjC getters with names like "newItem" should still be linked to the @property. 2015-01-16 23:04:26 +00:00
DeclOpenMP.cpp
DeclPrinter.cpp
DeclTemplate.cpp
DeclarationName.cpp
Expr.cpp AST: alignof might be dependent because of alignment attributes 2015-01-15 10:04:14 +00:00
ExprCXX.cpp
ExprClassification.cpp AST: Remove overzealous assertion from IsModifiable 2015-01-04 00:44:32 +00:00
ExprConstant.cpp Support constant evaluation for member calls on std::initializer_list 2014-12-17 19:24:30 +00:00
ExternalASTSource.cpp
InheritViz.cpp
ItaniumCXXABI.cpp Fix the issue of mangling of local anonymous unions (Itanium C++ ABI): 2014-12-12 16:17:46 +00:00
ItaniumMangle.cpp Initial support for Win64 SEH IR emission 2015-01-22 01:36:17 +00:00
Makefile
Mangle.cpp This patch fixes a crash involving use of predefined 2014-12-02 18:42:51 +00:00
MicrosoftCXXABI.cpp
MicrosoftMangle.cpp Initial support for Win64 SEH IR emission 2015-01-22 01:36:17 +00:00
NSAPI.cpp Objective-C. revert patch for rdar://17554063. 2014-10-28 18:28:16 +00:00
NestedNameSpecifier.cpp
ParentMap.cpp
RawCommentList.cpp
RecordLayout.cpp
RecordLayoutBuilder.cpp Update for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool> as per the C++ standard's associative container concept. 2014-11-19 07:49:47 +00:00
SelectorLocationsKind.cpp
Stmt.cpp First patch with codegen of the 'omp for' directive. It implements 2014-12-15 07:07:06 +00:00
StmtIterator.cpp
StmtPrinter.cpp [c++1z] N4295: fold-expressions. 2014-11-08 05:07:16 +00:00
StmtProfile.cpp Preserve numeric literal suffixes during type canonicalization. 2014-11-20 03:37:32 +00:00
StmtViz.cpp
TemplateBase.cpp Use APSInt::isSameValue instead of operator== in a place where two APSInt's 2015-01-09 00:58:16 +00:00
TemplateName.cpp
Type.cpp Fix isTriviallyCopyableType for arrays 2015-01-21 19:39:10 +00:00
TypeLoc.cpp Fix initializing TypeOfTypeLoc 2014-10-24 13:52:55 +00:00
TypePrinter.cpp Re-apply "r226548 - Introduce SPIR calling conventions" reverted in r226558. 2015-01-20 11:20:41 +00:00
VTTBuilder.cpp Update for LLVM API change to make Small(Ptr)Set::insert return pair<iterator, bool> as per the C++ standard's associative container concept. 2014-11-19 07:49:47 +00:00
VTableBuilder.cpp Fix typo. 2014-11-29 23:57:35 +00:00