aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-05-08Don't destroy the data associated with an overload resolution candidate; ↵Douglas Gregor
it's ASTContext-allocated now git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08Record template argument deduction failures for member functionDouglas Gregor
templates and conversion function templates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103349 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08When printing an overload candidate that failed due to SFINAE, print aDouglas Gregor
specific message that includes the template arguments, e.g., test/SemaTemplate/overload-candidates.cpp:27:20: note: candidate template ignored: substitution failure [with T = int *] typename T::type get_type(const T&); // expected-note{{candidate ... ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08Improve overload-candidate diagnostic for a function template thatDouglas Gregor
failed because the explicitly-specified template arguments did not match its template parameters, e.g., test/SemaTemplate/overload-candidates.cpp:18:8: note: candidate template ignored: invalid explicitly-specified argument for template parameter 'I' void get(const T&); ^ test/SemaTemplate/overload-candidates.cpp:20:8: note: candidate template ignored: invalid explicitly-specified argument for 1st template parameter void get(const T&); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103344 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08A leak is better than a double-free while I figure out how to addressDouglas Gregor
this issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103343 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08Minor cleanup, and ban copying of OverloadCandidateSets. NoDouglas Gregor
functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08When template argument deduction fails because the call had tooDouglas Gregor
many/too few arguments, use the same diagnostic we use for arity mismatches in non-templates (but note that it's a function template). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103341 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08When printing a non-viable overload candidate that failed due toDouglas Gregor
conflicting deduced template argument values, give a more specific reason along with those values, e.g., test/SemaTemplate/overload-candidates.cpp:4:10: note: candidate template ignored: deduced conflicting types for parameter 'T' ('int' vs. 'long') const T& min(const T&, const T&); ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103339 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08Fix test for Release-Asserts buildDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103337 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08Update latest checker build to a local link.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103332 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07When we encounter a non-dependent type during template instantiation,Douglas Gregor
mark any declarations we see inside of that type as "referenced". Fixes PR7079. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103323 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07If there is not any debug info for type then do not emit debug info for this ↵Devang Patel
variable. A recent change to tightly verify debug info prepared by FE caught this. This fixes unittest build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103320 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Introduce a recursive AST visitor that makes it trivial to recursivelyDouglas Gregor
walk an entire AST, including all of the types, declarations, statements, and expressions, and allowing one to easily override the behavior of the walk at any particular node kind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07The FP constant evaluator was missing a few cases of unary operators that ↵John McCall
return floats but whose operand isn't a float: specifically, __real__ and __imag__. Instead of filtering these out, just implement them. Fixes <rdar://problem/7958272>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07add PCH support for a bunch of C++ Decls, patch byChris Lattner
Andrew Sutton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103301 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Make that null-dereference fix a little clearer by rearranging some code.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Fix a potential null dereference in the pointer-to-bool evaluator; caught byJohn McCall
Eli Friedman. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Change the pointer / lvalue constant evaluators to build into a target referenceJohn McCall
and return a bool. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103296 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07add more types to -ast-print-xml, PR5006Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103294 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Extend C++ usrs to include type mangling for tag decl arguments, indicating ↵Ted Kremenek
whether a method is static, and mangling in the qualifers of the method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07clean up isBeforeInTranslationUnit by factoring out some commonChris Lattner
code into a MoveUpIncludeHierarchy helper, and use the helper to fix a case involving macros which regressed from my recent patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Switch USR generation over from NamedDecl::getNameAsString() to ↵Ted Kremenek
NamedDecl::printName(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Add NamedDecl::printName() for clients that to use getNameAsString() but are ↵Ted Kremenek
already using a raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Reapply the reference-binding patch applied below, along with a fix toDouglas Gregor
ensure that we complete the type when we need to look at constructors during reference binding. When determining whether the two types involved in reference binding are reference-compatible, reference-related, etc., do not complete the type of the reference itself because it is not necessary to determine well-formedness of the program. Complete the type that we are binding to, since that can affect whether we know about a derived-to-base conversion. Re-fixes PR7080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103283 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Minor mod. to my last patch.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Fixes a Code gen crash trying to use a dot-syntax forFariborz Jahanian
a property of a c++ class object (radar 7957369). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Avoid use of DIDescriptor::getNode(). Use overloaded operators instead.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103273 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Change the complex constant evaluator to return a bool instead of an APValue.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103268 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Add missing #includeDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103260 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Revert r103220. It seems to be breaking self-hostDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103259 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Add a stub frontend action for BoostCon, for next week's workshop.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Fix PR4386 by implementing gcc's old behaviour (4.2) when initializingRafael Espindola
variables with a comparison of a function pointer with 0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103253 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Test case for my last fix.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07A correct fix for bug 6466.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103250 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07And finally, revert the accidental check-in part of the previous reversion. ↵Sebastian Redl
I'm on a roll. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103249 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Revert 103247, it causes lots of test failures.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Pass the correct type to BuildMemberReferenceExpr. Fixes bug 6466.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103247 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07reimplement the guts of SourceManager::isBeforeInTranslationUnitChris Lattner
to be algorithmically faster and avoid an std::map. This routine basically boils down to finding the nearest common ancestor in a tree, and we (implicitly) have information about nesting depth, use it! This wraps up rdar://7948633 - SourceManager::isBeforeInTranslationUnit has poor performance git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103239 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Change Evaluate* in the constant evaluator to enforce being given an argument ofJohn McCall
the right type. It turns out that the code was already doing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103238 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Move CheckICE and isIntegerConstantExpr to ExprConstant.cpp because it seemedJohn McCall
like a good idea at the time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07start using the caching now that it appears to work!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103236 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07reimplement the caching in the SourceManager::isBeforeInTranslationUnit()Chris Lattner
method to be correct. Right now it correctly computes the cache, then goes ahead and computes the result the hard way, then asserts that they match. Next I'll actually turn it on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Add initial USR support for mangling in the types of C++ functions and methods.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103225 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Add CXCursor support for LinkageSpecDecl (e.g., 'extern "C"').Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Add USR test case for C++ operator methods.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103223 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Reverted r103214.mike-m
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07Implement encoding of methods which have instantiatedFariborz Jahanian
template arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103221 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07When determining whether the two types involved in reference bindingDouglas Gregor
are reference-compatible, reference-related, etc., do not complete the type of the reference itself because it is not necessary to determine well-formedness of the program. Complete the type that we are binding to, since that can affect whether we know about a derived-to-base conversion. Fixes PR7080. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06After some discussion, conservatively extend our sentinel check to discardJohn McCall
casts, but still require the (casted) type to be a pointer. Fixes PR5685. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103216 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-062nd part of: Overhauled llvm/clang docs builds.mike-m
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103214 91177308-0d34-0410-b5e6-96231b3b80d8