r196142 - Rectifying style issues with generated code. No functional change intended.

Alp Toker alp at nuanti.com
Mon Dec 2 23:08:19 PST 2013


On 02/12/2013 19:36, Aaron Ballman wrote:
> Author: aaronballman
> Date: Mon Dec  2 13:36:42 2013
> New Revision: 196142
>
> URL: http://llvm.org/viewvc/llvm-project?rev=196142&view=rev
> Log:
> Rectifying style issues with generated code. No functional change intended.
>
> Modified:
>      cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
>
> Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=196142&r1=196141&r2=196142&view=diff
> ==============================================================================
> --- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
> +++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Mon Dec  2 13:36:42 2013
> @@ -1694,7 +1694,7 @@ static void emitArgInfo(const Record &R,
>   }
>   
>   static void GenerateDefaultAppertainsTo(raw_ostream &OS) {
> -  OS << "static bool DefaultAppertainsTo(Sema &, const AttributeList &,";
> +  OS << "static bool defaultAppertainsTo(Sema &, const AttributeList &,";
>     OS << "const Decl *) {\n";
>     OS << "  return true;\n";
>     OS << "}\n\n";
> @@ -1848,7 +1848,7 @@ static std::string GenerateAppertainsTo(
>     // If the attribute does not contain a Subjects definition, then use the
>     // default appertainsTo logic.
>     if (Attr.isValueUnset("Subjects"))
> -    return "DefaultAppertainsTo";
> +    return "defaultAppertainsTo";
>   
>     const Record *SubjectObj = Attr.getValueAsDef("Subjects");
>     std::vector<Record*> Subjects = SubjectObj->getValueAsListOfDefs("Subjects");
> @@ -1856,14 +1856,14 @@ static std::string GenerateAppertainsTo(
>     // If the list of subjects is empty, it is assumed that the attribute
>     // appertains to everything.
>     if (Subjects.empty())
> -    return "DefaultAppertainsTo";
> +    return "defaultAppertainsTo";
>   
>     bool Warn = SubjectObj->getValueAsDef("Diag")->getValueAsBit("Warn");
>   
>     // Otherwise, generate an appertainsTo check specific to this attribute which
>     // checks all of the given subjects against the Decl passed in. Return the
>     // name of that check to the caller.
> -  std::string FnName = Attr.getName() + "AppertainsTo";
> +  std::string FnName = "check" + Attr.getName() + "AppertainTo";

Should that have been AppertainsTo?

Alp.

>     std::stringstream SS;
>     SS << "static bool " << FnName << "(Sema &S, const AttributeList &Attr, ";
>     SS << "const Decl *D) {\n";
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-commits mailing list