[clang-tools-extra] r187228 - Added new feature for checking macro and preprocessor conditional consistency.

Sean Silva silvas at purdue.edu
Fri Jul 26 11:51:59 PDT 2013


There are still a couple naming issues, e.g.

+    PPItemKey instanceKey(PP, MacroName, H, InstanceLoc);
+    PPItemKey definitionKey(PP, MacroName, H, DefinitionLoc);

+    StringHandle conditionUnexpanded(addString(ConditionUnexpanded));
+    PPItemKey instanceKey(PP, conditionUnexpanded, H, InstanceLoc);

+        std::string definitionSourceLine =

+    bool returnValue = false;

Make sure to hammer these out.

+///
+/// \file
+/// \brief Track preprocessor activities for modularize.
+///

You should probably describe the things that it tracks and why it tracks
them.

+// Forwards.
+class PreprocessorTrackerImpl;
+
+// Some handle types
+
+// String handle.
+typedef llvm::PooledStringPtr StringHandle;
+
+// Header handle.
+typedef int HeaderHandle;
+const HeaderHandle HeaderHandleInvalid = -1;
+
+// Header inclusion path handle.
+typedef int InclusionPathHandle;
+const InclusionPathHandle InclusionPathHandleInvalid = -1;

These comments are unnecessary.

Also, I'd like to see the overall architecture reflected in a file-level
comment somewhere.

+  // Overidden handlers.

Spelling. Overidden -> Overriden

-- Sean Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130726/31e9d675/attachment.html>


More information about the cfe-commits mailing list