[cfe-commits] [PATCH] [clang] Use initializer lists for FrontendOptions
Saleem Abdulrasool
compnerd at compnerd.org
Thu Dec 20 23:23:03 PST 2012
Switch to using an initializer list rather than initializing the values in the constructor. The constructor implementation is trivial beyond the value initialisations.
http://llvm-reviews.chandlerc.com/D232
Files:
include/clang/Frontend/FrontendOptions.h
Index: include/clang/Frontend/FrontendOptions.h
===================================================================
--- include/clang/Frontend/FrontendOptions.h
+++ include/clang/Frontend/FrontendOptions.h
@@ -204,20 +204,14 @@
std::string OverrideRecordLayoutsFile;
public:
- FrontendOptions() {
- DisableFree = 0;
- ProgramAction = frontend::ParseSyntaxOnly;
- ActionName = "";
- RelocatablePCH = 0;
- ShowHelp = 0;
- ShowStats = 0;
- ShowTimers = 0;
- ShowVersion = 0;
- ARCMTAction = ARCMT_None;
- ARCMTMigrateEmitARCErrors = 0;
- SkipFunctionBodies = 0;
- ObjCMTAction = ObjCMT_None;
- }
+ FrontendOptions() :
+ DisableFree(false), RelocatablePCH(false), ShowHelp(false),
+ ShowStats(false), ShowTimers(false), ShowVersion(false),
+ FixWhatYouCan(false), FixOnlyWarnings(false), FixAndRecompile(false),
+ FixToTemporaries(false), ARCMTMigrateEmitARCErrors(false),
+ SkipFunctionBodies(false), ARCMTAction(ARCMT_None),
+ ObjCMTAction(ObjCMT_None), ProgramAction(frontend::ParseSyntaxOnly)
+ {}
/// getInputKindForExtension - Return the appropriate input kind for a file
/// extension. For example, "c" would return IK_C.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D232.1.patch
Type: text/x-patch
Size: 1199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121220/c5e0b372/attachment.bin>
More information about the cfe-commits
mailing list