llvm-project/clang/lib/Sema
Douglas Gregor d6ab8744dc When we parse a tag specifier, keep track of whether that tag
specifier resulted in the creation of a new TagDecl node, which
happens either when the tag specifier was a definition or when the tag
specifier was the first declaration of that tag type. This information
has several uses, the first of which is implemented in this commit:

  1) In C++, one is not allowed to define tag types within a type
  specifier (e.g., static_cast<struct S { int x; } *>(0) is
  ill-formed) or within the result or parameter types of a
  function. We now diagnose this.

  2) We can extend DeclGroups to contain information about any tags
  that are declared/defined within the declaration specifiers of a
  variable, e.g.,

    struct Point { int x, y, z; } p;

  This will help improve AST printing and template instantiation,
  among other things.

  3) For C99, we can keep track of whether a tag type is defined
  within the type of a parameter, to properly cope with cases like,
  e.g.,

    int bar(struct T2 { int x; } y) {
      struct T2 z;
    }

  We can also do similar things wherever there is a type specifier,
  e.g., to keep track of where the definition of S occurs in this
  legal C99 code:

    (struct S { int x, y; } *)0

  

llvm-svn: 72555
2009-05-28 23:31:59 +00:00
..
CMakeLists.txt Move statement instantiation into its own file. No functionality change 2009-05-15 18:22:25 +00:00
CXXFieldCollector.h Unifies the name-lookup mechanisms used in various parts of the AST 2008-12-11 16:49:14 +00:00
IdentifierResolver.cpp Lazy deserialization of the declaration chains associated with 2009-04-21 22:25:48 +00:00
IdentifierResolver.h Lazy deserialization of the declaration chains associated with 2009-04-21 22:25:48 +00:00
JumpDiagnostics.cpp Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes. 2009-04-27 20:27:31 +00:00
Makefile Build system changes to use TableGen to generate the various 2009-03-16 23:06:59 +00:00
ParseAST.cpp Lazy deserialization of the declaration chains associated with 2009-04-21 22:25:48 +00:00
Sema.cpp Introduce a stack of instantiation scopes that are used to store the mapping from variable declarations that occur within templates to their instantiated counterparts 2009-05-14 21:44:34 +00:00
Sema.h When we parse a tag specifier, keep track of whether that tag 2009-05-28 23:31:59 +00:00
SemaAccess.cpp Add a new, more advanced CheckDerivedToBaseConversion that takes custom diagnostic IDs. 2009-05-13 21:11:42 +00:00
SemaAttr.cpp Deallocate 'DeclRefExpr's in correctly formed '#pragma unused' 2009-03-23 22:50:47 +00:00
SemaCXXScopeSpec.cpp Implement explicit instantiations of member classes of class templates, e.g., 2009-05-14 00:28:11 +00:00
SemaChecking.cpp tweak non-null check to put the caret on the function, but underline the 2009-05-25 18:23:36 +00:00
SemaDecl.cpp When we parse a tag specifier, keep track of whether that tag 2009-05-28 23:31:59 +00:00
SemaDeclAttr.cpp implementation of format_arg for ObjC methods/functions. 2009-05-20 17:41:43 +00:00
SemaDeclCXX.cpp Reimplement much of the way that we track nested classes in the 2009-05-27 23:11:45 +00:00
SemaDeclObjC.cpp (Next runtime only) check to see if class implements forwardInvocation method 2009-05-22 17:12:32 +00:00
SemaExpr.cpp Don't drop the computed implicit conversions when building a call to 2009-05-27 05:00:47 +00:00
SemaExprCXX.cpp Template instantiation for C++ "new" expressions. 2009-05-21 00:00:09 +00:00
SemaExprObjC.cpp Convert ObjC qualified type clients over to using iterators. 2009-05-27 16:21:00 +00:00
SemaInherit.cpp Use an iterator type for found_decls_begin/found_decls_end. 2009-05-13 21:22:06 +00:00
SemaInherit.h Use an iterator type for found_decls_begin/found_decls_end. 2009-05-13 21:22:06 +00:00
SemaInit.cpp Fix another test case. 2009-05-27 16:38:58 +00:00
SemaLookup.cpp Improve name lookup for and template instantiation of declaration 2009-05-27 17:07:49 +00:00
SemaNamedCast.cpp Reflow some comments. 2009-05-16 07:39:55 +00:00
SemaOverload.cpp Avoid using the built-in type checker for assignment in C++ when classes are involved. Patch by Vyacheslav Kononenko. 2009-05-21 11:50:50 +00:00
SemaOverload.h Fix a crash bug when comparing overload quality of conversion operators with conversion constructors. 2009-04-16 17:51:27 +00:00
SemaStmt.cpp Use v.data() instead of &v[0] when SmallVector v might be empty. 2009-05-21 09:52:38 +00:00
SemaTemplate.cpp When we parse a tag specifier, keep track of whether that tag 2009-05-28 23:31:59 +00:00
SemaTemplateInstantiate.cpp Simplify, and improve the performance of, template instantiation for 2009-05-27 17:54:46 +00:00
SemaTemplateInstantiateDecl.cpp Introduced DeclContext::isDependentContext, which determines whether a 2009-05-28 16:34:51 +00:00
SemaTemplateInstantiateExpr.cpp Simplify, and improve the performance of, template instantiation for 2009-05-27 17:54:46 +00:00
SemaTemplateInstantiateStmt.cpp Reimplement much of the way that we track nested classes in the 2009-05-27 23:11:45 +00:00
SemaType.cpp When we parse a tag specifier, keep track of whether that tag 2009-05-28 23:31:59 +00:00