diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/ASTContext.h | 4 | ||||
-rw-r--r-- | include/clang/Edit/EditedSource.h | 2 | ||||
-rw-r--r-- | include/clang/Lex/Lexer.h | 30 | ||||
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 20 | ||||
-rw-r--r-- | include/clang/Parse/Parser.h | 20 | ||||
-rw-r--r-- | include/clang/Sema/Initialization.h | 2 | ||||
-rw-r--r-- | include/clang/Sema/Lookup.h | 2 | ||||
-rw-r--r-- | include/clang/Sema/Sema.h | 4 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Core/CheckerManager.h | 2 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h | 6 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h | 4 |
11 files changed, 48 insertions, 48 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 425ee3cdb2..96e41c5d03 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -411,7 +411,7 @@ public: const TargetInfo &getTargetInfo() const { return *Target; } - const LangOptions& getLangOptions() const { return LangOpts; } + const LangOptions& getLangOpts() const { return LangOpts; } DiagnosticsEngine &getDiagnostics() const; @@ -1058,7 +1058,7 @@ public: /// \brief The result type of logical operations, '<', '>', '!=', etc. QualType getLogicalOperationType() const { - return getLangOptions().CPlusPlus ? BoolTy : IntTy; + return getLangOpts().CPlusPlus ? BoolTy : IntTy; } /// getObjCEncodingForType - Emit the ObjC type encoding for the diff --git a/include/clang/Edit/EditedSource.h b/include/clang/Edit/EditedSource.h index 095ec74c7b..c685753e4b 100644 --- a/include/clang/Edit/EditedSource.h +++ b/include/clang/Edit/EditedSource.h @@ -50,7 +50,7 @@ public: StrAlloc(/*size=*/512) { } const SourceManager &getSourceManager() const { return SourceMgr; } - const LangOptions &getLangOptions() const { return LangOpts; } + const LangOptions &getLangOpts() const { return LangOpts; } const PreprocessingRecord *getPreprocessingRecord() const { return PPRec; } bool canInsertInOffset(SourceLocation OrigLoc, FileOffset Offs); diff --git a/include/clang/Lex/Lexer.h b/include/clang/Lex/Lexer.h index df30394947..04bcead6d4 100644 --- a/include/clang/Lex/Lexer.h +++ b/include/clang/Lex/Lexer.h @@ -51,7 +51,7 @@ class Lexer : public PreprocessorLexer { const char *BufferStart; // Start of the buffer. const char *BufferEnd; // End of the buffer. SourceLocation FileLoc; // Location for start of file. - LangOptions Features; // Features enabled by this language (cache). + LangOptions LangOpts; // LangOpts enabled by this language (cache). bool Is_PragmaLexer; // True if lexer for _Pragma handling. //===--------------------------------------------------------------------===// @@ -99,14 +99,14 @@ public: /// Lexer constructor - Create a new raw lexer object. This object is only /// suitable for calls to 'LexRawToken'. This lexer assumes that the text /// range will outlive it, so it doesn't take ownership of it. - Lexer(SourceLocation FileLoc, const LangOptions &Features, + Lexer(SourceLocation FileLoc, const LangOptions &LangOpts, const char *BufStart, const char *BufPtr, const char *BufEnd); /// Lexer constructor - Create a new raw lexer object. This object is only /// suitable for calls to 'LexRawToken'. This lexer assumes that the text /// range will outlive it, so it doesn't take ownership of it. Lexer(FileID FID, const llvm::MemoryBuffer *InputBuffer, - const SourceManager &SM, const LangOptions &Features); + const SourceManager &SM, const LangOptions &LangOpts); /// Create_PragmaLexer: Lexer constructor - Create a new lexer object for /// _Pragma expansion. This has a variety of magic semantics that this method @@ -117,9 +117,9 @@ public: unsigned TokLen, Preprocessor &PP); - /// getFeatures - Return the language features currently enabled. NOTE: this - /// lexer modifies features as a file is parsed! - const LangOptions &getFeatures() const { return Features; } + /// getLangOpts - Return the language features currently enabled. + /// NOTE: this lexer modifies features as a file is parsed! + const LangOptions &getLangOpts() const { return LangOpts; } /// getFileLoc - Return the File Location for the file we are lexing out of. /// The physical location encodes the location where the characters come from, @@ -240,7 +240,7 @@ public: /// if an internal buffer is returned. static unsigned getSpelling(const Token &Tok, const char *&Buffer, const SourceManager &SourceMgr, - const LangOptions &Features, + const LangOptions &LangOpts, bool *Invalid = 0); /// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a @@ -250,7 +250,7 @@ public: /// UCNs, etc. static std::string getSpelling(const Token &Tok, const SourceManager &SourceMgr, - const LangOptions &Features, + const LangOptions &LangOpts, bool *Invalid = 0); /// getSpelling - This method is used to get the spelling of the @@ -264,7 +264,7 @@ public: static StringRef getSpelling(SourceLocation loc, SmallVectorImpl<char> &buffer, const SourceManager &SourceMgr, - const LangOptions &Features, + const LangOptions &LangOpts, bool *invalid = 0); /// MeasureTokenLength - Relex the token at the specified location and return @@ -290,7 +290,7 @@ public: static SourceLocation AdvanceToTokenCharacter(SourceLocation TokStart, unsigned Character, const SourceManager &SM, - const LangOptions &Features); + const LangOptions &LangOpts); /// \brief Computes the source location just past the end of the /// token at this source location. @@ -309,7 +309,7 @@ public: /// a source location pointing to the last character in the token, etc. static SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset, const SourceManager &SM, - const LangOptions &Features); + const LangOptions &LangOpts); /// \brief Returns true if the given MacroID location points at the first /// token of the macro expansion. @@ -372,7 +372,7 @@ public: /// of the file begins along with a boolean value indicating whether /// the preamble ends at the beginning of a new line. static std::pair<unsigned, bool> - ComputePreamble(const llvm::MemoryBuffer *Buffer, const LangOptions &Features, + ComputePreamble(const llvm::MemoryBuffer *Buffer, const LangOptions &LangOpts, unsigned MaxLines = 0); //===--------------------------------------------------------------------===// @@ -486,7 +486,7 @@ public: /// getCharAndSizeNoWarn - Like the getCharAndSize method, but does not ever /// emit a warning. static inline char getCharAndSizeNoWarn(const char *Ptr, unsigned &Size, - const LangOptions &Features) { + const LangOptions &LangOpts) { // If this is not a trigraph and not a UCN or escaped newline, return // quickly. if (isObviouslySimpleCharacter(Ptr[0])) { @@ -495,7 +495,7 @@ public: } Size = 0; - return getCharAndSizeSlowNoWarn(Ptr, Size, Features); + return getCharAndSizeSlowNoWarn(Ptr, Size, LangOpts); } /// getEscapedNewLineSize - Return the size of the specified escaped newline, @@ -524,7 +524,7 @@ private: /// getCharAndSizeSlowNoWarn - Same as getCharAndSizeSlow, but never emits a /// diagnostic. static char getCharAndSizeSlowNoWarn(const char *Ptr, unsigned &Size, - const LangOptions &Features); + const LangOptions &LangOpts); //===--------------------------------------------------------------------===// // Other lexer functions. diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index c5bccb1171..508c168f99 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -62,7 +62,7 @@ class ModuleLoader; /// class Preprocessor : public RefCountedBase<Preprocessor> { DiagnosticsEngine *Diags; - LangOptions &Features; + LangOptions &LangOpts; const TargetInfo *Target; FileManager &FileMgr; SourceManager &SourceMgr; @@ -357,7 +357,7 @@ public: DiagnosticsEngine &getDiagnostics() const { return *Diags; } void setDiagnostics(DiagnosticsEngine &D) { Diags = &D; } - const LangOptions &getLangOptions() const { return Features; } + const LangOptions &getLangOpts() const { return LangOpts; } const TargetInfo &getTargetInfo() const { return *Target; } FileManager &getFileManager() const { return FileMgr; } SourceManager &getSourceManager() const { return SourceMgr; } @@ -782,7 +782,7 @@ public: StringRef getSpelling(SourceLocation loc, SmallVectorImpl<char> &buffer, bool *invalid = 0) const { - return Lexer::getSpelling(loc, buffer, SourceMgr, Features, invalid); + return Lexer::getSpelling(loc, buffer, SourceMgr, LangOpts, invalid); } /// getSpelling() - Return the 'spelling' of the Tok token. The spelling of a @@ -793,7 +793,7 @@ public: /// /// \param Invalid If non-null, will be set \c true if an error occurs. std::string getSpelling(const Token &Tok, bool *Invalid = 0) const { - return Lexer::getSpelling(Tok, SourceMgr, Features, Invalid); + return Lexer::getSpelling(Tok, SourceMgr, LangOpts, Invalid); } /// getSpelling - This method is used to get the spelling of a token into a @@ -808,7 +808,7 @@ public: /// if an internal buffer is returned. unsigned getSpelling(const Token &Tok, const char *&Buffer, bool *Invalid = 0) const { - return Lexer::getSpelling(Tok, Buffer, SourceMgr, Features, Invalid); + return Lexer::getSpelling(Tok, Buffer, SourceMgr, LangOpts, Invalid); } /// getSpelling - This method is used to get the spelling of a token into a @@ -843,7 +843,7 @@ public: /// refers to the SourceManager-owned buffer of the source where that macro /// name is spelled. Thus, the result shouldn't out-live the SourceManager. StringRef getImmediateMacroName(SourceLocation Loc) { - return Lexer::getImmediateMacroName(Loc, SourceMgr, getLangOptions()); + return Lexer::getImmediateMacroName(Loc, SourceMgr, getLangOpts()); } /// CreateString - Plop the specified string into a scratch buffer and set the @@ -869,7 +869,7 @@ public: /// location pointing just past the end of the token; an offset of 1 produces /// a source location pointing to the last character in the token, etc. SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset = 0) { - return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, Features); + return Lexer::getLocForEndOfToken(Loc, Offset, SourceMgr, LangOpts); } /// \brief Returns true if the given MacroID location points at the first @@ -879,7 +879,7 @@ public: /// begin location of the macro. bool isAtStartOfMacroExpansion(SourceLocation loc, SourceLocation *MacroBegin = 0) const { - return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, Features, + return Lexer::isAtStartOfMacroExpansion(loc, SourceMgr, LangOpts, MacroBegin); } @@ -890,7 +890,7 @@ public: /// end location of the macro. bool isAtEndOfMacroExpansion(SourceLocation loc, SourceLocation *MacroEnd = 0) const { - return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, Features, MacroEnd); + return Lexer::isAtEndOfMacroExpansion(loc, SourceMgr, LangOpts, MacroEnd); } /// DumpToken - Print the token to stderr, used for debugging. @@ -903,7 +903,7 @@ public: /// token, return a new location that specifies a character within the token. SourceLocation AdvanceToTokenCharacter(SourceLocation TokStart, unsigned Char) const { - return Lexer::AdvanceToTokenCharacter(TokStart, Char, SourceMgr, Features); + return Lexer::AdvanceToTokenCharacter(TokStart, Char, SourceMgr, LangOpts); } /// IncrementPasteCounter - Increment the counters for the number of token diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index e3b6fe2cf4..2124f1ebe2 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -202,7 +202,7 @@ public: Parser(Preprocessor &PP, Sema &Actions); ~Parser(); - const LangOptions &getLang() const { return PP.getLangOptions(); } + const LangOptions &getLangOpts() const { return PP.getLangOpts(); } const TargetInfo &getTargetInfo() const { return PP.getTargetInfo(); } Preprocessor &getPreprocessor() const { return PP; } Sema &getActions() const { return Actions; } @@ -544,7 +544,7 @@ private: bool TryAltiVecToken(DeclSpec &DS, SourceLocation Loc, const char *&PrevSpec, unsigned &DiagID, bool &isInvalid) { - if (!getLang().AltiVec || + if (!getLangOpts().AltiVec || (Tok.getIdentifierInfo() != Ident_vector && Tok.getIdentifierInfo() != Ident_pixel)) return false; @@ -556,7 +556,7 @@ private: /// identifier token, replacing it with the non-context-sensitive __vector. /// This returns true if the token was replaced. bool TryAltiVecVectorToken() { - if (!getLang().AltiVec || + if (!getLangOpts().AltiVec || Tok.getIdentifierInfo() != Ident_vector) return false; return TryAltiVecVectorTokenOutOfLine(); } @@ -1712,7 +1712,7 @@ private: /// expression statement, when parsing function bodies. /// Returns true for declaration, false for expression. bool isDeclarationStatement() { - if (getLang().CPlusPlus) + if (getLangOpts().CPlusPlus) return isCXXDeclarationStatement(); return isDeclarationSpecifier(true); } @@ -1722,7 +1722,7 @@ private: // 'for-init-statement' part of a 'for' statement. /// Returns true for declaration, false for expression. bool isForInitDeclaration() { - if (getLang().CPlusPlus) + if (getLangOpts().CPlusPlus) return isCXXSimpleDeclaration(/*AllowForRangeDecl=*/true); return isDeclarationSpecifier(true); } @@ -1748,7 +1748,7 @@ private: /// whether the parens contain an expression or a type-id. /// Returns true for a type-id and false for an expression. bool isTypeIdInParens(bool &isAmbiguous) { - if (getLang().CPlusPlus) + if (getLangOpts().CPlusPlus) return isCXXTypeId(TypeIdInParens, isAmbiguous); isAmbiguous = false; return isTypeSpecifierQualifier(); @@ -1890,7 +1890,7 @@ private: SourceLocation *EndLoc); void MaybeParseCXX0XAttributes(Declarator &D) { - if (getLang().CPlusPlus0x && isCXX0XAttributeSpecifier()) { + if (getLangOpts().CPlusPlus0x && isCXX0XAttributeSpecifier()) { ParsedAttributesWithRange attrs(AttrFactory); SourceLocation endLoc; ParseCXX0XAttributes(attrs, &endLoc); @@ -1899,7 +1899,7 @@ private: } void MaybeParseCXX0XAttributes(ParsedAttributes &attrs, SourceLocation *endLoc = 0) { - if (getLang().CPlusPlus0x && isCXX0XAttributeSpecifier()) { + if (getLangOpts().CPlusPlus0x && isCXX0XAttributeSpecifier()) { ParsedAttributesWithRange attrsWithRange(AttrFactory); ParseCXX0XAttributes(attrsWithRange, endLoc); attrs.takeAllFrom(attrsWithRange); @@ -1907,7 +1907,7 @@ private: } void MaybeParseCXX0XAttributes(ParsedAttributesWithRange &attrs, SourceLocation *endLoc = 0) { - if (getLang().CPlusPlus0x && isCXX0XAttributeSpecifier()) + if (getLangOpts().CPlusPlus0x && isCXX0XAttributeSpecifier()) ParseCXX0XAttributes(attrs, endLoc); } @@ -1918,7 +1918,7 @@ private: void MaybeParseMicrosoftAttributes(ParsedAttributes &attrs, SourceLocation *endLoc = 0) { - if (getLang().MicrosoftExt && Tok.is(tok::l_square)) + if (getLangOpts().MicrosoftExt && Tok.is(tok::l_square)) ParseMicrosoftAttributes(attrs, endLoc); } void ParseMicrosoftAttributes(ParsedAttributes &attrs, diff --git a/include/clang/Sema/Initialization.h b/include/clang/Sema/Initialization.h index 1c31c574b1..9040703436 100644 --- a/include/clang/Sema/Initialization.h +++ b/include/clang/Sema/Initialization.h @@ -175,7 +175,7 @@ public: /// \brief Create the initialization entity for a parameter. static InitializedEntity InitializeParameter(ASTContext &Context, ParmVarDecl *Parm) { - bool Consumed = (Context.getLangOptions().ObjCAutoRefCount && + bool Consumed = (Context.getLangOpts().ObjCAutoRefCount && Parm->hasAttr<NSConsumedAttr>()); InitializedEntity Entity; diff --git a/include/clang/Sema/Lookup.h b/include/clang/Sema/Lookup.h index d35711a361..fe5d262733 100644 --- a/include/clang/Sema/Lookup.h +++ b/include/clang/Sema/Lookup.h @@ -592,7 +592,7 @@ private: void diagnose() { if (isAmbiguous()) SemaRef.DiagnoseAmbiguousLookup(*this); - else if (isClassLookup() && SemaRef.getLangOptions().AccessControl) + else if (isClassLookup() && SemaRef.getLangOpts().AccessControl) SemaRef.CheckLookupAccess(*this); } diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index a1d743bd4b..cd200f327a 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -745,7 +745,7 @@ public: /// initialized but before it parses anything. void Initialize(); - const LangOptions &getLangOptions() const { return LangOpts; } + const LangOptions &getLangOpts() const { return LangOpts; } OpenCLOptions &getOpenCLOptions() { return OpenCLFeatures; } FPOptions &getFPOptions() { return FPFeatures; } @@ -3024,7 +3024,7 @@ public: public: explicit ImplicitExceptionSpecification(ASTContext &Context) : Context(&Context), ComputedEST(EST_BasicNoexcept) { - if (!Context.getLangOptions().CPlusPlus0x) + if (!Context.getLangOpts().CPlusPlus0x) ComputedEST = EST_DynamicNone; } diff --git a/include/clang/StaticAnalyzer/Core/CheckerManager.h b/include/clang/StaticAnalyzer/Core/CheckerManager.h index fa22f53d5f..b8a024b9cc 100644 --- a/include/clang/StaticAnalyzer/Core/CheckerManager.h +++ b/include/clang/StaticAnalyzer/Core/CheckerManager.h @@ -128,7 +128,7 @@ public: void finishedCheckerRegistration(); - const LangOptions &getLangOptions() const { return LangOpts; } + const LangOptions &getLangOpts() const { return LangOpts; } typedef CheckerBase *CheckerRef; typedef const void *CheckerTag; diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h index c191a65883..3e19b26328 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h @@ -38,7 +38,7 @@ class AnalysisManager : public BugReporterData { ASTContext &Ctx; DiagnosticsEngine &Diags; - const LangOptions &LangInfo; + const LangOptions &LangOpts; OwningPtr<PathDiagnosticConsumer> PD; @@ -148,8 +148,8 @@ public: return Diags; } - const LangOptions &getLangOptions() const { - return LangInfo; + const LangOptions &getLangOpts() const { + return LangOpts; } virtual PathDiagnosticConsumer *getPathDiagnosticConsumer() { diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h index d02eab77c8..3bed6daf7c 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h @@ -78,8 +78,8 @@ public: return Eng.getContext(); } - const LangOptions &getLangOptions() const { - return Eng.getContext().getLangOptions(); + const LangOptions &getLangOpts() const { + return Eng.getContext().getLangOpts(); } const LocationContext *getLocationContext() const { |