diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-11-08 06:54:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-11-08 06:54:53 +0000 |
| commit | 289ab7bb1dad4ab0ab60753feeada754194cb9a6 (patch) | |
| tree | 13c5c5db5b026e8f4befd497312ccbbc18c81ec3 /clang | |
| parent | b26b665742fff7d44585805020365497bd9a6d96 (diff) | |
| download | bcm5719-llvm-289ab7bb1dad4ab0ab60753feeada754194cb9a6.tar.gz bcm5719-llvm-289ab7bb1dad4ab0ab60753feeada754194cb9a6.zip | |
rename SemaDecl.cpp/h to SemaDeclSpec.cpp/h
llvm-svn: 39149
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/Driver/PrintParserCallbacks.cpp | 2 | ||||
| -rw-r--r-- | clang/Parse/DeclSpec.cpp | 6 | ||||
| -rw-r--r-- | clang/Parse/MinimalAction.cpp | 2 | ||||
| -rw-r--r-- | clang/Parse/ParseDecl.cpp | 11 | ||||
| -rw-r--r-- | clang/Parse/ParseStmt.cpp | 2 | ||||
| -rw-r--r-- | clang/Parse/Parser.cpp | 2 | ||||
| -rw-r--r-- | clang/clang.xcodeproj/project.pbxproj | 12 | ||||
| -rw-r--r-- | clang/include/clang/AST/Decl.h | 2 | ||||
| -rw-r--r-- | clang/include/clang/Parse/DeclSpec.h | 8 | ||||
| -rw-r--r-- | clang/include/clang/Parse/Parser.h | 2 |
10 files changed, 26 insertions, 23 deletions
diff --git a/clang/Driver/PrintParserCallbacks.cpp b/clang/Driver/PrintParserCallbacks.cpp index ddf2bb88516..51d62cd36b2 100644 --- a/clang/Driver/PrintParserCallbacks.cpp +++ b/clang/Driver/PrintParserCallbacks.cpp @@ -15,7 +15,7 @@ #include "clang.h" #include "clang/Lex/IdentifierTable.h" #include "clang/Parse/Action.h" -#include "clang/Parse/SemaDecl.h" +#include "clang/Parse/SemaDeclSpec.h" #include <iostream> using namespace llvm; diff --git a/clang/Parse/DeclSpec.cpp b/clang/Parse/DeclSpec.cpp index deece5895bd..10ad35052cf 100644 --- a/clang/Parse/DeclSpec.cpp +++ b/clang/Parse/DeclSpec.cpp @@ -1,4 +1,4 @@ -//===--- SemaDecl.cpp - Declaration Semantic Analysis ---------------------===// +//===--- SemaDeclSpec.cpp - Declaration Specifier Semantic Analysis -------===// // // The LLVM Compiler Infrastructure // @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// // -// This file implements semantic analysis for declarations. +// This file implements semantic analysis for declaration specifiers. // //===----------------------------------------------------------------------===// -#include "clang/Parse/SemaDecl.h" +#include "clang/Parse/SemaDeclSpec.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceLocation.h" using namespace llvm; diff --git a/clang/Parse/MinimalAction.cpp b/clang/Parse/MinimalAction.cpp index e3fbaa95c33..78afe8a25ee 100644 --- a/clang/Parse/MinimalAction.cpp +++ b/clang/Parse/MinimalAction.cpp @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "clang/Parse/Parser.h" -#include "clang/Parse/SemaDecl.h" +#include "clang/Parse/SemaDeclSpec.h" #include "clang/Parse/Scope.h" using namespace llvm; using namespace clang; diff --git a/clang/Parse/ParseDecl.cpp b/clang/Parse/ParseDecl.cpp index b3cb9353a72..6d184c50372 100644 --- a/clang/Parse/ParseDecl.cpp +++ b/clang/Parse/ParseDecl.cpp @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "clang/Parse/Parser.h" -#include "clang/Parse/SemaDecl.h" +#include "clang/Parse/SemaDeclSpec.h" using namespace llvm; using namespace clang; @@ -83,6 +83,10 @@ void Parser::ParseDeclaration(unsigned Context) { // TODO: emit error on 'int;' or 'const enum foo;'. // if (!DS.isMissingDeclaratorOk()) Diag(...); + // TODO: Register 'struct foo;' with the type system as an opaque struct. + // TODO: Check that we don't already have 'union foo;' or something else + // that conflicts. + ConsumeToken(); return; } @@ -141,8 +145,9 @@ ParseInitDeclaratorListAfterFirstDeclarator(Declarator &D) { } } - // Inform the current actions module that we just parsed a declarator. - // TODO: pass asm & attributes. + // Inform the current actions module that we just parsed a declarator or + // invoke semantic analysis for this declarator. + // FIXME: pass asm & attributes. LastDeclInGroup = Actions.ParseDeclarator(CurScope, D, Init.Val, LastDeclInGroup); diff --git a/clang/Parse/ParseStmt.cpp b/clang/Parse/ParseStmt.cpp index 77523850889..dec89b211c6 100644 --- a/clang/Parse/ParseStmt.cpp +++ b/clang/Parse/ParseStmt.cpp @@ -14,7 +14,7 @@ #include "clang/Parse/Parser.h" #include "clang/Basic/Diagnostic.h" -#include "clang/Parse/SemaDecl.h" +#include "clang/Parse/SemaDeclSpec.h" #include "clang/Parse/Scope.h" using namespace llvm; using namespace clang; diff --git a/clang/Parse/Parser.cpp b/clang/Parse/Parser.cpp index 936396b74bd..85b099ff008 100644 --- a/clang/Parse/Parser.cpp +++ b/clang/Parse/Parser.cpp @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "clang/Parse/Parser.h" -#include "clang/Parse/SemaDecl.h" +#include "clang/Parse/SemaDeclSpec.h" #include "clang/Parse/Scope.h" using namespace llvm; using namespace clang; diff --git a/clang/clang.xcodeproj/project.pbxproj b/clang/clang.xcodeproj/project.pbxproj index 206b0d2a29f..13c366703ec 100644 --- a/clang/clang.xcodeproj/project.pbxproj +++ b/clang/clang.xcodeproj/project.pbxproj @@ -30,11 +30,10 @@ DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */; }; DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */; }; DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */; }; - DE3460280AFDCD6F00DBC861 /* SemaDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3460270AFDCD6F00DBC861 /* SemaDecl.cpp */; }; - DE3460310AFDCDC100DBC861 /* SemaDecl.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3460300AFDCDC100DBC861 /* SemaDecl.h */; }; DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */; }; DE34621D0AFEB19B00DBC861 /* StmtPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE34621C0AFEB19B00DBC861 /* StmtPrinter.cpp */; }; DE3462960B019D9800DBC861 /* Type.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3462950B019D9800DBC861 /* Type.h */; }; + DE3462D90B01B52900DBC861 /* SemaDeclSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3462D80B01B52900DBC861 /* SemaDeclSpec.cpp */; }; DE46BF280AE0A82D00CC047C /* TargetInfo.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE46BF270AE0A82D00CC047C /* TargetInfo.h */; }; DE5932D10AD60FF400BC794C /* clang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE5932CD0AD60FF400BC794C /* clang.cpp */; }; DE5932D20AD60FF400BC794C /* clang.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE5932CE0AD60FF400BC794C /* clang.h */; }; @@ -122,7 +121,6 @@ DE345C1A0AFC658B00DBC861 /* StmtVisitor.h in CopyFiles */, DE345C780AFC6BE600DBC861 /* ASTBuilder.h in CopyFiles */, DE345F220AFD347900DBC861 /* StmtNodes.def in CopyFiles */, - DE3460310AFDCDC100DBC861 /* SemaDecl.h in CopyFiles */, DE3462960B019D9800DBC861 /* Type.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 1; @@ -154,11 +152,10 @@ DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParseStmt.cpp; path = Parse/ParseStmt.cpp; sourceTree = "<group>"; }; DE34600E0AFDCCCE00DBC861 /* ParseDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParseDecl.cpp; path = Parse/ParseDecl.cpp; sourceTree = "<group>"; }; DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ParseExpr.cpp; path = Parse/ParseExpr.cpp; sourceTree = "<group>"; }; - DE3460270AFDCD6F00DBC861 /* SemaDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDecl.cpp; path = Parse/SemaDecl.cpp; sourceTree = "<group>"; }; - DE3460300AFDCDC100DBC861 /* SemaDecl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SemaDecl.h; path = clang/Parse/SemaDecl.h; sourceTree = "<group>"; }; DE3461260AFE68BE00DBC861 /* MinimalAction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MinimalAction.cpp; path = Parse/MinimalAction.cpp; sourceTree = "<group>"; }; DE34621C0AFEB19B00DBC861 /* StmtPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = StmtPrinter.cpp; path = AST/StmtPrinter.cpp; sourceTree = "<group>"; }; DE3462950B019D9800DBC861 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Type.h; path = clang/Parse/Type.h; sourceTree = "<group>"; }; + DE3462D80B01B52900DBC861 /* SemaDeclSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SemaDeclSpec.cpp; path = Parse/SemaDeclSpec.cpp; sourceTree = "<group>"; }; DE46BF270AE0A82D00CC047C /* TargetInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetInfo.h; sourceTree = "<group>"; }; DE5932CD0AD60FF400BC794C /* clang.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = clang.cpp; path = Driver/clang.cpp; sourceTree = "<group>"; }; DE5932CE0AD60FF400BC794C /* clang.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = clang.h; path = Driver/clang.h; sourceTree = "<group>"; }; @@ -260,7 +257,6 @@ children = ( DE06E8130A8FF9330050E87E /* Action.h */, DE1F22020A7D852A00FBF588 /* Parser.h */, - DE3460300AFDCDC100DBC861 /* SemaDecl.h */, DE06BECA0A854E4B0050E87E /* Scope.h */, DE3462950B019D9800DBC861 /* Type.h */, ); @@ -277,7 +273,7 @@ DE3460120AFDCCDA00DBC861 /* ParseExpr.cpp */, DE34600A0AFDCCBF00DBC861 /* ParseStmt.cpp */, DE345FFF0AFDCC1900DBC861 /* ParseObjc.cpp */, - DE3460270AFDCD6F00DBC861 /* SemaDecl.cpp */, + DE3462D80B01B52900DBC861 /* SemaDeclSpec.cpp */, ); name = Parse; sourceTree = "<group>"; @@ -472,9 +468,9 @@ DE34600B0AFDCCBF00DBC861 /* ParseStmt.cpp in Sources */, DE34600F0AFDCCCE00DBC861 /* ParseDecl.cpp in Sources */, DE3460130AFDCCDA00DBC861 /* ParseExpr.cpp in Sources */, - DE3460280AFDCD6F00DBC861 /* SemaDecl.cpp in Sources */, DE3461270AFE68BE00DBC861 /* MinimalAction.cpp in Sources */, DE34621D0AFEB19B00DBC861 /* StmtPrinter.cpp in Sources */, + DE3462D90B01B52900DBC861 /* SemaDeclSpec.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index cd27dee4c2b..60481e6dd04 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -15,7 +15,7 @@ #define LLVM_CLANG_AST_DECL_H #include "clang/Basic/SourceLocation.h" -#include "clang/Parse/SemaDecl.h" +#include "clang/Parse/SemaDeclSpec.h" namespace llvm { namespace clang { diff --git a/clang/include/clang/Parse/DeclSpec.h b/clang/include/clang/Parse/DeclSpec.h index 1daa44491be..8e2c583116e 100644 --- a/clang/include/clang/Parse/DeclSpec.h +++ b/clang/include/clang/Parse/DeclSpec.h @@ -1,4 +1,4 @@ -//===--- SemaDecl.h - Declaration Semantic Analysis -------------*- C++ -*-===// +//===--- SemaDeclSpec.h - Declaration Specifier Semantic Analys -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,12 +7,12 @@ // //===----------------------------------------------------------------------===// // -// This file defines interfaces used for Declarations. +// This file defines interfaces used for Declaration Specifiers and Declarators. // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_SEMADECL_H -#define LLVM_CLANG_PARSE_SEMADECL_H +#ifndef LLVM_CLANG_PARSE_SEMADECLSPEC_H +#define LLVM_CLANG_PARSE_SEMADECLSPEC_H #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceLocation.h" diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 1f8d9640e76..96d4ae693aa 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -349,6 +349,8 @@ private: void ParseDirectDeclarator(Declarator &D); void ParseParenDeclarator(Declarator &D); void ParseBracketDeclarator(Declarator &D); + + DeclTy *SemaInitDeclarator(Declarator &D, ExprTy *Init, DeclTy *LastInGroup); }; } // end namespace clang |

