diff --git a/clang/include/clang/Sema/ParseAST.h b/clang/include/clang/Parse/ParseAST.h similarity index 95% rename from clang/include/clang/Sema/ParseAST.h rename to clang/include/clang/Parse/ParseAST.h index 57d7d0637f4f..0d37e21becd3 100644 --- a/clang/include/clang/Sema/ParseAST.h +++ b/clang/include/clang/Parse/ParseAST.h @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_SEMA_PARSEAST_H -#define LLVM_CLANG_SEMA_PARSEAST_H +#ifndef LLVM_CLANG_PARSE_PARSEAST_H +#define LLVM_CLANG_PARSE_PARSEAST_H namespace clang { class Preprocessor; diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h index 9a166a1e98ef..23e7f39bd00b 100644 --- a/clang/include/clang/Parse/Parser.h +++ b/clang/include/clang/Parse/Parser.h @@ -16,8 +16,8 @@ #include "clang/Basic/Specifiers.h" #include "clang/Lex/Preprocessor.h" -#include "clang/Parse/Action.h" -#include "clang/Parse/DeclSpec.h" +#include "clang/Sema/Action.h" +#include "clang/Sema/DeclSpec.h" #include "llvm/ADT/OwningPtr.h" #include #include diff --git a/clang/include/clang/Parse/Action.h b/clang/include/clang/Sema/Action.h similarity index 99% rename from clang/include/clang/Parse/Action.h rename to clang/include/clang/Sema/Action.h index 263dacb43d24..8f1772efbea2 100644 --- a/clang/include/clang/Parse/Action.h +++ b/clang/include/clang/Sema/Action.h @@ -11,16 +11,16 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_ACTION_H -#define LLVM_CLANG_PARSE_ACTION_H +#ifndef LLVM_CLANG_SEMA_ACTION_H +#define LLVM_CLANG_SEMA_ACTION_H #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/Specifiers.h" #include "clang/Basic/TemplateKinds.h" #include "clang/Basic/TypeTraits.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Ownership.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Ownership.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/ADT/PointerUnion.h" diff --git a/clang/include/clang/Parse/AttributeList.h b/clang/include/clang/Sema/AttributeList.h similarity index 96% rename from clang/include/clang/Parse/AttributeList.h rename to clang/include/clang/Sema/AttributeList.h index e6bf9b6cc62a..dcb8d1fd67ba 100644 --- a/clang/include/clang/Parse/AttributeList.h +++ b/clang/include/clang/Sema/AttributeList.h @@ -1,4 +1,4 @@ -//===--- AttributeList.h ----------------------------------------*- C++ -*-===// +//===--- AttributeList.h - Parsed attribute sets ----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,14 +7,15 @@ // //===----------------------------------------------------------------------===// // -// This file defines the AttributeList class interface. +// This file defines the AttributeList class, which is used to collect +// parsed attributes. // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_ATTRLIST_H -#define LLVM_CLANG_ATTRLIST_H +#ifndef LLVM_CLANG_SEMA_ATTRLIST_H +#define LLVM_CLANG_SEMA_ATTRLIST_H -#include "clang/Parse/Ownership.h" +#include "clang/Sema/Ownership.h" #include "clang/Basic/SourceLocation.h" #include diff --git a/clang/include/clang/Parse/DeclSpec.h b/clang/include/clang/Sema/DeclSpec.h similarity index 98% rename from clang/include/clang/Parse/DeclSpec.h rename to clang/include/clang/Sema/DeclSpec.h index b9fa6503b44b..5f70c53f6e08 100644 --- a/clang/include/clang/Parse/DeclSpec.h +++ b/clang/include/clang/Sema/DeclSpec.h @@ -1,4 +1,4 @@ -//===--- SemaDeclSpec.h - Declaration Specifier Semantic Analys -*- C++ -*-===// +//===--- DeclSpec.h - Parsed declaration specifiers -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,14 +7,20 @@ // //===----------------------------------------------------------------------===// // -// This file defines interfaces used for Declaration Specifiers and Declarators. +// This file defines the classes used to store parsed information about +// declaration-specifiers and declarators. +// +// static const int volatile x, *y, *(*(*z)[10])(const void *x); +// ------------------------- - -- --------------------------- +// declaration-specifiers \ | / +// declarators // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_DECLSPEC_H -#define LLVM_CLANG_PARSE_DECLSPEC_H +#ifndef LLVM_CLANG_SEMA_DECLSPEC_H +#define LLVM_CLANG_SEMA_DECLSPEC_H -#include "clang/Parse/AttributeList.h" +#include "clang/Sema/AttributeList.h" #include "clang/Lex/Token.h" #include "clang/Basic/OperatorKinds.h" #include "clang/Basic/Specifiers.h" diff --git a/clang/include/clang/Parse/Designator.h b/clang/include/clang/Sema/Designator.h similarity index 98% rename from clang/include/clang/Parse/Designator.h rename to clang/include/clang/Sema/Designator.h index 255af5901819..43cfc0b75ed4 100644 --- a/clang/include/clang/Parse/Designator.h +++ b/clang/include/clang/Sema/Designator.h @@ -12,10 +12,10 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_DESIGNATOR_H -#define LLVM_CLANG_PARSE_DESIGNATOR_H +#ifndef LLVM_CLANG_SEMA_DESIGNATOR_H +#define LLVM_CLANG_SEMA_DESIGNATOR_H -#include "clang/Parse/Action.h" +#include "clang/Sema/Action.h" namespace clang { diff --git a/clang/include/clang/Sema/IdentifierResolver.h b/clang/include/clang/Sema/IdentifierResolver.h index e494792c54df..540d6987d07e 100644 --- a/clang/include/clang/Sema/IdentifierResolver.h +++ b/clang/include/clang/Sema/IdentifierResolver.h @@ -16,7 +16,7 @@ #define LLVM_CLANG_AST_SEMA_IDENTIFIERRESOLVER_H #include "clang/Basic/IdentifierTable.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/Scope.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclarationName.h" #include "clang/AST/DeclCXX.h" diff --git a/clang/include/clang/Sema/Initialization.h b/clang/include/clang/Sema/Initialization.h index 2696960b57b7..29581ebef350 100644 --- a/clang/include/clang/Sema/Initialization.h +++ b/clang/include/clang/Sema/Initialization.h @@ -13,10 +13,10 @@ #ifndef LLVM_CLANG_SEMA_INITIALIZATION_H #define LLVM_CLANG_SEMA_INITIALIZATION_H +#include "clang/Sema/Action.h" #include "clang/Sema/Overload.h" #include "clang/AST/Type.h" #include "clang/AST/UnresolvedSet.h" -#include "clang/Parse/Action.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallVector.h" diff --git a/clang/include/clang/Parse/Ownership.h b/clang/include/clang/Sema/Ownership.h similarity index 99% rename from clang/include/clang/Parse/Ownership.h rename to clang/include/clang/Sema/Ownership.h index 45b8046e1a02..b7e69628fa94 100644 --- a/clang/include/clang/Parse/Ownership.h +++ b/clang/include/clang/Sema/Ownership.h @@ -1,4 +1,4 @@ -//===--- Ownership.h - Parser Ownership Helpers -----------------*- C++ -*-===// +//===--- Ownership.h - Parser ownership helpers -----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_OWNERSHIP_H -#define LLVM_CLANG_PARSE_OWNERSHIP_H +#ifndef LLVM_CLANG_SEMA_OWNERSHIP_H +#define LLVM_CLANG_SEMA_OWNERSHIP_H #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/PointerIntPair.h" diff --git a/clang/include/clang/Parse/Template.h b/clang/include/clang/Sema/ParsedTemplate.h similarity index 96% rename from clang/include/clang/Parse/Template.h rename to clang/include/clang/Sema/ParsedTemplate.h index ba291b0c7482..8a3a96136e18 100644 --- a/clang/include/clang/Parse/Template.h +++ b/clang/include/clang/Sema/ParsedTemplate.h @@ -1,4 +1,4 @@ -//===--- Template.h - Template Parsing Data Types -------------------------===// +//===--- ParsedTemplate.h - Template Parsing Data Types -------------------===// // // The LLVM Compiler Infrastructure // @@ -11,11 +11,11 @@ // templates. // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_TEMPLATE_H -#define LLVM_CLANG_PARSE_TEMPLATE_H +#ifndef LLVM_CLANG_SEMA_PARSEDTEMPLATE_H +#define LLVM_CLANG_SEMA_PARSEDTEMPLATE_H -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Ownership.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Ownership.h" #include namespace clang { diff --git a/clang/include/clang/Parse/Scope.h b/clang/include/clang/Sema/Scope.h similarity index 99% rename from clang/include/clang/Parse/Scope.h rename to clang/include/clang/Sema/Scope.h index f4f0cb72066a..16fe642d2403 100644 --- a/clang/include/clang/Parse/Scope.h +++ b/clang/include/clang/Sema/Scope.h @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_SCOPE_H -#define LLVM_CLANG_PARSE_SCOPE_H +#ifndef LLVM_CLANG_SEMA_SCOPE_H +#define LLVM_CLANG_SEMA_SCOPE_H -#include "clang/Parse/Action.h" +#include "clang/Sema/Action.h" #include "llvm/ADT/SmallPtrSet.h" namespace clang { diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 68ca7a17feb0..4940216d88a8 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -15,6 +15,7 @@ #ifndef LLVM_CLANG_AST_SEMA_H #define LLVM_CLANG_AST_SEMA_H +#include "clang/Sema/Action.h" #include "clang/Sema/IdentifierResolver.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "clang/Sema/CXXFieldCollector.h" @@ -28,7 +29,6 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/FullExpr.h" -#include "clang/Parse/Action.h" #include "clang/Sema/SemaDiagnostic.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/DenseSet.h" diff --git a/clang/lib/Frontend/DiagChecker.cpp b/clang/lib/Frontend/DiagChecker.cpp index a50cc99ab79e..66d7ed7cf40a 100644 --- a/clang/lib/Frontend/DiagChecker.cpp +++ b/clang/lib/Frontend/DiagChecker.cpp @@ -13,7 +13,7 @@ #include "clang/Frontend/Utils.h" #include "clang/Frontend/TextDiagnosticBuffer.h" -#include "clang/Sema/ParseAST.h" +#include "clang/Parse/ParseAST.h" #include "clang/AST/ASTConsumer.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Preprocessor.h" diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index 531213bf1b16..b244c5ce0225 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -15,7 +15,7 @@ #include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendDiagnostic.h" -#include "clang/Sema/ParseAST.h" +#include "clang/Parse/ParseAST.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Timer.h" #include "llvm/Support/ErrorHandling.h" diff --git a/clang/lib/Parse/CMakeLists.txt b/clang/lib/Parse/CMakeLists.txt index ca62f1558d16..cb0c186f5b83 100644 --- a/clang/lib/Parse/CMakeLists.txt +++ b/clang/lib/Parse/CMakeLists.txt @@ -1,9 +1,7 @@ set(LLVM_NO_RTTI 1) add_clang_library(clangParse - Action.cpp - AttributeList.cpp - DeclSpec.cpp + ParseAST.cpp ParseCXXInlineMethods.cpp ParseDecl.cpp ParseDeclCXX.cpp diff --git a/clang/lib/Sema/ParseAST.cpp b/clang/lib/Parse/ParseAST.cpp similarity index 99% rename from clang/lib/Sema/ParseAST.cpp rename to clang/lib/Parse/ParseAST.cpp index 8f2f097ec55e..0279bb9e06ca 100644 --- a/clang/lib/Sema/ParseAST.cpp +++ b/clang/lib/Parse/ParseAST.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/ParseAST.h" +#include "clang/Parse/ParseAST.h" #include "clang/Sema/Sema.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "clang/Sema/SemaConsumer.h" diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp index fbb8a7369d95..6b3374db4fda 100644 --- a/clang/lib/Parse/ParseCXXInlineMethods.cpp +++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp @@ -13,8 +13,8 @@ #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" using namespace clang; /// ParseCXXInlineMethodDef - We parsed and verified that the specified diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 928c2a9b5124..3f976362cd42 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -13,8 +13,8 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "RAIIObjectsForParser.h" #include "llvm/ADT/SmallSet.h" using namespace clang; diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 5f404ac43001..0772450867d5 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -14,9 +14,9 @@ #include "clang/Basic/OperatorKinds.h" #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "RAIIObjectsForParser.h" using namespace clang; diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 844dd3f873bb..21033b4d1930 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -20,9 +20,9 @@ //===----------------------------------------------------------------------===// #include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "clang/Basic/PrettyStackTrace.h" #include "RAIIObjectsForParser.h" #include "llvm/ADT/SmallVector.h" diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp index f5ade8a8fb5e..67b109c833a7 100644 --- a/clang/lib/Parse/ParseExprCXX.cpp +++ b/clang/lib/Parse/ParseExprCXX.cpp @@ -13,8 +13,8 @@ #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" #include "llvm/Support/ErrorHandling.h" using namespace clang; diff --git a/clang/lib/Parse/ParseInit.cpp b/clang/lib/Parse/ParseInit.cpp index 8451aebc04bd..138058545f98 100644 --- a/clang/lib/Parse/ParseInit.cpp +++ b/clang/lib/Parse/ParseInit.cpp @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/Designator.h" #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/Designator.h" +#include "clang/Sema/Scope.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/raw_ostream.h" using namespace clang; diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 00df5a2c5aba..ddfc7c014a18 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" #include "clang/Parse/ParseDiagnostic.h" +#include "clang/Parse/Parser.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" #include "llvm/ADT/SmallVector.h" using namespace clang; diff --git a/clang/lib/Parse/ParsePragma.cpp b/clang/lib/Parse/ParsePragma.cpp index c53b2e4d27cc..c468869e5b48 100644 --- a/clang/lib/Parse/ParsePragma.cpp +++ b/clang/lib/Parse/ParsePragma.cpp @@ -13,9 +13,9 @@ #include "ParsePragma.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Lex/Preprocessor.h" -#include "clang/Parse/Action.h" #include "clang/Parse/Parser.h" +#include "clang/Lex/Preprocessor.h" +#include "clang/Sema/Action.h" using namespace clang; diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp index ccd56e98aa11..d4c83a73fb7b 100644 --- a/clang/lib/Parse/ParseStmt.cpp +++ b/clang/lib/Parse/ParseStmt.cpp @@ -14,8 +14,8 @@ #include "clang/Parse/Parser.h" #include "RAIIObjectsForParser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/PrettyStackTrace.h" #include "clang/Basic/SourceManager.h" diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index ccf953d2824a..a8faee3b4390 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -13,9 +13,9 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" +#include "clang/Sema/Scope.h" #include "RAIIObjectsForParser.h" using namespace clang; diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index dfd866ff841b..dcf1d4062899 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -14,7 +14,7 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/ParsedTemplate.h" using namespace clang; /// isCXXDeclarationStatement - C++-specialized function that disambiguates diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 4e0ae8723459..2864bf28bae7 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -13,9 +13,9 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "llvm/Support/raw_ostream.h" #include "RAIIObjectsForParser.h" #include "ParsePragma.h" diff --git a/clang/lib/Parse/Action.cpp b/clang/lib/Sema/Action.cpp similarity index 97% rename from clang/lib/Parse/Action.cpp rename to clang/lib/Sema/Action.cpp index b34d14f50a01..db0779f8b362 100644 --- a/clang/lib/Parse/Action.cpp +++ b/clang/lib/Sema/Action.cpp @@ -11,9 +11,8 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" #include "clang/Basic/TargetInfo.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/RecyclingAllocator.h" diff --git a/clang/lib/Parse/AttributeList.cpp b/clang/lib/Sema/AttributeList.cpp similarity index 99% rename from clang/lib/Parse/AttributeList.cpp rename to clang/lib/Sema/AttributeList.cpp index 8263923fe257..cf99227a8dbb 100644 --- a/clang/lib/Parse/AttributeList.cpp +++ b/clang/lib/Sema/AttributeList.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/AttributeList.h" +#include "clang/Sema/AttributeList.h" #include "clang/Basic/IdentifierTable.h" #include "llvm/ADT/StringSwitch.h" using namespace clang; diff --git a/clang/lib/Sema/CMakeLists.txt b/clang/lib/Sema/CMakeLists.txt index 70b4792f3ba5..2144bfefb1a1 100644 --- a/clang/lib/Sema/CMakeLists.txt +++ b/clang/lib/Sema/CMakeLists.txt @@ -1,11 +1,13 @@ set(LLVM_NO_RTTI 1) add_clang_library(clangSema + Action.cpp AnalysisBasedWarnings.cpp + AttributeList.cpp CodeCompleteConsumer.cpp + DeclSpec.cpp IdentifierResolver.cpp JumpDiagnostics.cpp - ParseAST.cpp Sema.cpp SemaAccess.cpp SemaAttr.cpp diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp index c1b666a792ad..29d97a24145e 100644 --- a/clang/lib/Sema/CodeCompleteConsumer.cpp +++ b/clang/lib/Sema/CodeCompleteConsumer.cpp @@ -11,9 +11,9 @@ // //===----------------------------------------------------------------------===// #include "clang/Sema/CodeCompleteConsumer.h" +#include "clang/Sema/Scope.h" #include "clang/Sema/Sema.h" #include "clang/AST/DeclCXX.h" -#include "clang/Parse/Scope.h" #include "clang/Lex/Preprocessor.h" #include "clang-c/Index.h" #include "llvm/ADT/STLExtras.h" diff --git a/clang/lib/Parse/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp similarity index 99% rename from clang/lib/Parse/DeclSpec.cpp rename to clang/lib/Sema/DeclSpec.cpp index c5072276bc14..417f8978c79d 100644 --- a/clang/lib/Parse/DeclSpec.cpp +++ b/clang/lib/Sema/DeclSpec.cpp @@ -11,9 +11,9 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Template.h" +#include "clang/Parse/ParseDiagnostic.h" // FIXME: remove this back-dependency! +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" #include "clang/Lex/Preprocessor.h" #include "clang/Basic/LangOptions.h" #include "llvm/ADT/STLExtras.h" diff --git a/clang/lib/Sema/SemaCXXScopeSpec.cpp b/clang/lib/Sema/SemaCXXScopeSpec.cpp index 0525dec002f0..9794ec613a98 100644 --- a/clang/lib/Sema/SemaCXXScopeSpec.cpp +++ b/clang/lib/Sema/SemaCXXScopeSpec.cpp @@ -18,7 +18,7 @@ #include "clang/AST/ExprCXX.h" #include "clang/AST/NestedNameSpecifier.h" #include "clang/Basic/PartialDiagnostic.h" -#include "clang/Parse/DeclSpec.h" +#include "clang/Sema/DeclSpec.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/raw_ostream.h" using namespace clang; diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index f6d6e6b39953..339cb6632de1 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -21,9 +21,9 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/StmtCXX.h" -#include "clang/Parse/DeclSpec.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Template.h" #include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index e423c35f5277..8a9870916e97 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -17,7 +17,7 @@ #include "clang/AST/DeclObjC.h" #include "clang/AST/Expr.h" #include "clang/Basic/TargetInfo.h" -#include "clang/Parse/DeclSpec.h" +#include "clang/Sema/DeclSpec.h" #include "llvm/ADT/StringExtras.h" using namespace clang; diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 19580957832a..fa87b7795714 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -23,8 +23,8 @@ #include "clang/AST/StmtVisitor.h" #include "clang/AST/TypeLoc.h" #include "clang/AST/TypeOrdering.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" #include "clang/Basic/PartialDiagnostic.h" #include "clang/Lex/Preprocessor.h" #include "llvm/ADT/STLExtras.h" diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 0abc4a915282..2d3da3c9aaae 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -17,7 +17,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" -#include "clang/Parse/DeclSpec.h" +#include "clang/Sema/DeclSpec.h" using namespace clang; /// ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 42d1599e2e9a..15e0f7f1c772 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -29,10 +29,10 @@ #include "clang/Basic/TargetInfo.h" #include "clang/Lex/LiteralSupport.h" #include "clang/Lex/Preprocessor.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Designator.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Designator.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" using namespace clang; diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 2267e0c75792..0a3ec0d053e8 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -22,8 +22,8 @@ #include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/TargetInfo.h" #include "clang/Lex/Preprocessor.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" #include "llvm/ADT/STLExtras.h" using namespace clang; diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 13ba8ee5f970..c26932b5906e 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -15,11 +15,11 @@ // //===----------------------------------------------------------------------===// +#include "clang/Sema/Designator.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/Lookup.h" #include "clang/Sema/Sema.h" #include "clang/Lex/Preprocessor.h" -#include "clang/Parse/Designator.h" #include "clang/AST/ASTContext.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/ExprObjC.h" diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 994b633db8ed..6067cf9de2c4 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "clang/Sema/Sema.h" #include "clang/Sema/Lookup.h" +#include "clang/Sema/DeclSpec.h" #include "clang/AST/ASTContext.h" #include "clang/AST/CXXInheritance.h" #include "clang/AST/Decl.h" @@ -21,7 +22,6 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" -#include "clang/Parse/DeclSpec.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/LangOptions.h" #include "llvm/ADT/STLExtras.h" diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 5cfacf78b577..74ee218c3e48 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -17,8 +17,8 @@ #include "clang/AST/ExprCXX.h" #include "clang/AST/DeclFriend.h" #include "clang/AST/DeclTemplate.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/PartialDiagnostic.h" #include "llvm/ADT/StringExtras.h" diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 97ad6bea336c..ee631b05891e 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -11,12 +11,12 @@ //===----------------------------------------------------------------------===/ #include "clang/Sema/Sema.h" +#include "clang/Sema/DeclSpec.h" #include "clang/AST/ASTContext.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/StmtVisitor.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" -#include "clang/Parse/DeclSpec.h" #include namespace clang { diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp index a7df4c12bf1a..1deac54b2be8 100644 --- a/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -12,12 +12,12 @@ #include "clang/Sema/Sema.h" #include "TreeTransform.h" +#include "clang/Sema/DeclSpec.h" #include "clang/Sema/Lookup.h" #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Expr.h" #include "clang/AST/DeclTemplate.h" -#include "clang/Parse/DeclSpec.h" #include "clang/Basic/LangOptions.h" using namespace clang; diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp index 1fdb17f4d2a7..8751a76482b5 100644 --- a/clang/lib/Sema/SemaType.cpp +++ b/clang/lib/Sema/SemaType.cpp @@ -21,7 +21,7 @@ #include "clang/AST/Expr.h" #include "clang/Basic/PartialDiagnostic.h" #include "clang/Basic/TargetInfo.h" -#include "clang/Parse/DeclSpec.h" +#include "clang/Sema/DeclSpec.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/ErrorHandling.h" using namespace clang; diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 9fa34f984fb8..1ad76792a062 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -24,8 +24,8 @@ #include "clang/AST/StmtCXX.h" #include "clang/AST/StmtObjC.h" #include "clang/AST/TypeLocBuilder.h" -#include "clang/Parse/Ownership.h" -#include "clang/Parse/Designator.h" +#include "clang/Sema/Ownership.h" +#include "clang/Sema/Designator.h" #include "clang/Lex/Preprocessor.h" #include "llvm/Support/ErrorHandling.h" #include diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt index 9426899e7bcd..5cf2cd6ebf34 100644 --- a/clang/tools/c-index-test/CMakeLists.txt +++ b/clang/tools/c-index-test/CMakeLists.txt @@ -6,10 +6,10 @@ set( LLVM_USED_LIBS clangFrontend clangDriver clangSerialization + clangParse clangSema clangAnalysis clangAST - clangParse clangLex clangBasic ) diff --git a/clang/tools/c-index-test/Makefile b/clang/tools/c-index-test/Makefile index 516a298ab317..f41aa8098155 100644 --- a/clang/tools/c-index-test/Makefile +++ b/clang/tools/c-index-test/Makefile @@ -15,7 +15,7 @@ TOOL_NO_EXPORTS = 1 LINK_COMPONENTS := bitreader mc core USEDLIBS = clang.a clangIndex.a clangFrontend.a clangDriver.a \ - clangSerialization.a clangSema.a clangAnalysis.a clangAST.a \ - clangParse.a clangLex.a clangBasic.a + clangSerialization.a clangParse.a clangSema.a clangAnalysis.a \ + clangAST.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile diff --git a/clang/tools/driver/CMakeLists.txt b/clang/tools/driver/CMakeLists.txt index 47345239e89c..5ca6fa1993e8 100644 --- a/clang/tools/driver/CMakeLists.txt +++ b/clang/tools/driver/CMakeLists.txt @@ -5,13 +5,13 @@ set( LLVM_USED_LIBS clangDriver clangSerialization clangCodeGen + clangParse clangSema clangChecker clangAnalysis clangIndex clangRewrite clangAST - clangParse clangLex clangBasic ) diff --git a/clang/tools/driver/Makefile b/clang/tools/driver/Makefile index 8cb63607261b..0fc0d6597c3c 100644 --- a/clang/tools/driver/Makefile +++ b/clang/tools/driver/Makefile @@ -28,8 +28,8 @@ include $(CLANG_LEVEL)/../../Makefile.config LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader bitwriter codegen \ ipo selectiondag USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangCodeGen.a \ - clangSema.a clangChecker.a clangAnalysis.a clangIndex.a \ - clangRewrite.a clangAST.a clangParse.a clangLex.a clangBasic.a + clangParse.a clangSema.a clangChecker.a clangAnalysis.a \ + clangIndex.a clangRewrite.a clangAST.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt index 635fca35bd1a..e06eecfb1494 100644 --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -6,10 +6,10 @@ set(LLVM_USED_LIBS clangFrontend clangDriver clangSerialization + clangParse clangSema clangAnalysis clangAST - clangParse clangLex clangBasic) diff --git a/clang/tools/libclang/Makefile b/clang/tools/libclang/Makefile index 2fa8c44558c8..6d2a13cfc0b4 100644 --- a/clang/tools/libclang/Makefile +++ b/clang/tools/libclang/Makefile @@ -16,8 +16,8 @@ LINK_LIBS_IN_SHARED = 1 SHARED_LIBRARY = 1 LINK_COMPONENTS := bitreader mc core -USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangSema.a \ - clangAnalysis.a clangAST.a clangParse.a clangLex.a clangBasic.a +USEDLIBS = clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \ + clangSema.a clangAnalysis.a clangAST.a clangLex.a clangBasic.a include $(CLANG_LEVEL)/Makefile