diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-03-11 07:00:24 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-03-11 07:00:24 +0000 |
commit | 4e4d08403ca5cfd4d558fa2936215d3a4e5a528d (patch) | |
tree | bc9bf6ce1639dc8a7ba02d0e3046ab14b5329d8c /lib/Sema/SemaChecking.cpp | |
parent | 7c02cfeb0861278c09ba05d1b92bd2a996bbe2e0 (diff) |
Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index f546bbe1fd..f00a655f59 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -43,7 +43,7 @@ using namespace sema; SourceLocation Sema::getLocationOfStringLiteralByte(const StringLiteral *SL, unsigned ByteNo) const { return SL->getLocationOfByte(ByteNo, PP.getSourceManager(), - PP.getLangOptions(), PP.getTargetInfo()); + PP.getLangOpts(), PP.getTargetInfo()); } /// Checks that a call expression's argument count is the desired number. @@ -2214,7 +2214,7 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier LM.getLength()))); if (!FS.hasStandardLengthModifier()) HandleNonStandardLengthModifier(LM, startSpecifier, specifierLen); - if (!FS.hasStandardConversionSpecifier(S.getLangOptions())) + if (!FS.hasStandardConversionSpecifier(S.getLangOpts())) HandleNonStandardConversionSpecifier(CS, startSpecifier, specifierLen); if (!FS.hasStandardLengthConversionCombination()) HandleNonStandardConversionSpecification(LM, CS, startSpecifier, @@ -2257,7 +2257,7 @@ CheckPrintfHandler::HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier // We may be able to offer a FixItHint if it is a supported type. PrintfSpecifier fixedFS = FS; - bool success = fixedFS.fixType(Ex->getType(), S.getLangOptions(), + bool success = fixedFS.fixType(Ex->getType(), S.getLangOpts(), S.Context, IsObjCLiteral); if (success) { @@ -2407,7 +2407,7 @@ bool CheckScanfHandler::HandleScanfSpecifier( if (!FS.hasStandardLengthModifier()) HandleNonStandardLengthModifier(LM, startSpecifier, specifierLen); - if (!FS.hasStandardConversionSpecifier(S.getLangOptions())) + if (!FS.hasStandardConversionSpecifier(S.getLangOpts())) HandleNonStandardConversionSpecifier(CS, startSpecifier, specifierLen); if (!FS.hasStandardLengthConversionCombination()) HandleNonStandardConversionSpecification(LM, CS, startSpecifier, @@ -2425,7 +2425,7 @@ bool CheckScanfHandler::HandleScanfSpecifier( const analyze_scanf::ScanfArgTypeResult &ATR = FS.getArgType(S.Context); if (ATR.isValid() && !ATR.matchesType(S.Context, Ex->getType())) { ScanfSpecifier fixedFS = FS; - bool success = fixedFS.fixType(Ex->getType(), S.getLangOptions(), + bool success = fixedFS.fixType(Ex->getType(), S.getLangOpts(), S.Context); if (success) { @@ -2496,7 +2496,7 @@ void Sema::CheckFormatString(const StringLiteral *FExpr, inFunctionCall); if (!analyze_format_string::ParsePrintfString(H, Str, Str + StrLen, - getLangOptions())) + getLangOpts())) H.DoneProcessing(); } else if (Type == FST_Scanf) { CheckScanfHandler H(*this, FExpr, OrigFormatExpr, firstDataArg, @@ -2505,7 +2505,7 @@ void Sema::CheckFormatString(const StringLiteral *FExpr, inFunctionCall); if (!analyze_format_string::ParseScanfString(H, Str, Str + StrLen, - getLangOptions())) + getLangOpts())) H.DoneProcessing(); } // TODO: handle other formats } @@ -2891,7 +2891,7 @@ Sema::CheckReturnStackAddr(Expr *RetValExp, QualType lhsType, // Perform checking for returned stack addresses, local blocks, // label addresses or references to temporaries. if (lhsType->isPointerType() || - (!getLangOptions().ObjCAutoRefCount && lhsType->isBlockPointerType())) { + (!getLangOpts().ObjCAutoRefCount && lhsType->isBlockPointerType())) { stackE = EvalAddr(RetValExp, refVars); } else if (lhsType->isReferenceType()) { stackE = EvalVal(RetValExp, refVars); @@ -4138,7 +4138,7 @@ void CheckImplicitConversion(Sema &S, Expr *E, QualType T, // In C, we pretend that the type of an EnumConstantDecl is its enumeration // type, to give us better diagnostics. QualType SourceType = E->getType(); - if (!S.getLangOptions().CPlusPlus) { + if (!S.getLangOpts().CPlusPlus) { if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(E)) if (EnumConstantDecl *ECD = dyn_cast<EnumConstantDecl>(DRE->getDecl())) { EnumDecl *Enum = cast<EnumDecl>(ECD->getDeclContext()); @@ -4338,7 +4338,7 @@ bool Sema::CheckParmsForFunctionDef(ParmVarDecl **P, ParmVarDecl **PEnd, if (CheckParameterNames && Param->getIdentifier() == 0 && !Param->isImplicit() && - !getLangOptions().CPlusPlus) + !getLangOpts().CPlusPlus) Diag(Param->getLocation(), diag::err_parameter_name_omitted); // C99 6.7.5.3p12: |