llvm-project/clang/lib/Sema
Douglas Gregor 15e5602e59 Improve diagnostics when the parser encounters a declarator with an
unknown type name, e.g.,

  foo::bar x;

when "bar" does not refer to a type in "foo". 

With this change, the parser now calls into the action to perform
diagnostics and can try to recover by substituting in an appropriate
type. For example, this allows us to easily diagnose some missing
"typename" specifiers, which we now do:

  test/SemaCXX/unknown-type-name.cpp:29:1: error: missing 'typename'
        prior to dependent type name 'A<T>::type'
  A<T>::type A<T>::f() { return type(); }
  ^~~~~~~~~~
  typename 

Fixes PR3990.

llvm-svn: 84053
2009-10-13 23:27:22 +00:00
..
CMakeLists.txt Test exception spec compatibility on return type and parameters. 2009-10-11 09:03:14 +00:00
CXXFieldCollector.h Unifies the name-lookup mechanisms used in various parts of the AST 2008-12-11 16:49:14 +00:00
CodeCompleteConsumer.cpp Minor tweaks for code-completion: 2009-10-09 22:16:47 +00:00
IdentifierResolver.cpp Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
IdentifierResolver.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
JumpDiagnostics.cpp Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
Makefile Installation of Clang libraries and headers, from Axel Naumann! 2009-10-08 22:15:31 +00:00
ParseAST.cpp Spell function pointer correctly. 2009-09-22 10:19:04 +00:00
Sema.cpp Improve diagnostics when the parser encounters a declarator with an 2009-10-13 23:27:22 +00:00
Sema.h Improve diagnostics when the parser encounters a declarator with an 2009-10-13 23:27:22 +00:00
SemaAccess.cpp Refactor the code that walks a C++ inheritance hierarchy, searching 2009-10-06 17:59:45 +00:00
SemaAttr.cpp Refactor the LookupResult API to simplify most common operations. Require users to 2009-10-09 21:13:30 +00:00
SemaCXXCast.cpp Refactor the code that walks a C++ inheritance hierarchy, searching 2009-10-06 17:59:45 +00:00
SemaCXXScopeSpec.cpp Unify our diagnostic printing for errors of the form, "we didn't like 2009-10-13 21:16:44 +00:00
SemaChecking.cpp Fix checking for a null pointer constant when the expression itself is 2009-09-25 04:25:58 +00:00
SemaCodeComplete.cpp Minor tweaks for code-completion: 2009-10-09 22:16:47 +00:00
SemaDecl.cpp Improve diagnostics when the parser encounters a declarator with an 2009-10-13 23:27:22 +00:00
SemaDeclAttr.cpp Fix for PR 5181. 2009-10-13 23:05:14 +00:00
SemaDeclCXX.cpp Unify our diagnostic printing for errors of the form, "we didn't like 2009-10-13 21:16:44 +00:00
SemaDeclObjC.cpp Refactor the LookupResult API to simplify most common operations. Require users to 2009-10-09 21:13:30 +00:00
SemaExceptionSpec.cpp Types appearing more than once in a spec shouldn't matter. 2009-10-11 09:11:23 +00:00
SemaExpr.cpp Check the return type of operator[]() and fix a thinko that lead to a crash in SemaCXX/overloaded-operator.cpp. 2009-10-13 22:22:09 +00:00
SemaExprCXX.cpp The operator loc points to the operator, not the function decl. 2009-10-13 22:55:59 +00:00
SemaExprObjC.cpp Refactor the LookupResult API to simplify most common operations. Require users to 2009-10-09 21:13:30 +00:00
SemaInit.cpp Improve diagnostic location information when checking the initialization of a reference 2009-09-23 23:04:10 +00:00
SemaLookup.cpp Qualified lookup through using declarations. Diagnose a new type of ambiguity. 2009-10-10 05:48:19 +00:00
SemaOverload.cpp Check the return type of binary operators and the arrow operator. 2009-10-13 22:43:21 +00:00
SemaOverload.h Don't allow the same function to enter the overload candidate set 2009-09-28 04:47:19 +00:00
SemaStmt.cpp make the diagnostic in the 'unused result' warning more precise 2009-10-13 04:53:48 +00:00
SemaTemplate.cpp Unify our diagnostic printing for errors of the form, "we didn't like 2009-10-13 21:16:44 +00:00
SemaTemplate.h Implement partial ordering of function template specializations 2009-09-14 18:39:43 +00:00
SemaTemplateDeduction.cpp Improve template argument deduction in the case where the parameter 2009-09-30 22:13:51 +00:00
SemaTemplateInstantiate.cpp When explicitly specializing a member that is a template, mark the 2009-10-13 16:30:37 +00:00
SemaTemplateInstantiateDecl.cpp When explicitly specializing a member that is a template, mark the 2009-10-13 16:30:37 +00:00
SemaType.cpp Diagnose the declaration of explicit specializations after an implicit 2009-10-12 20:18:28 +00:00
TreeTransform.h Introduce ObjCProtocolListType type subclass. 2009-09-29 19:42:55 +00:00