From: Aaron Ballman Date: Mon, 2 Dec 2013 19:36:42 +0000 (+0000) Subject: Rectifying style issues with generated code. No functional change intended. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=773297c49a305a9ce442fa78f5a917ab8403b3c8;p=clang Rectifying style issues with generated code. No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196142 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index 526b5fe9e1..13c5c99b3e 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -1694,7 +1694,7 @@ static void emitArgInfo(const Record &R, std::stringstream &OS) { } 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(const Record &Attr, raw_ostream &OS) { // 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 Subjects = SubjectObj->getValueAsListOfDefs("Subjects"); @@ -1856,14 +1856,14 @@ static std::string GenerateAppertainsTo(const Record &Attr, raw_ostream &OS) { // 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"; std::stringstream SS; SS << "static bool " << FnName << "(Sema &S, const AttributeList &Attr, "; SS << "const Decl *D) {\n";