Responding to @bogner's comments that he sent via email.

================
Comment at: include/clang/Basic/DiagnosticOptions.h:37
@@ -27,1 +36,3 @@
+};
+
 /// \brief Options for controlling the compiler diagnostics engine.
----------------
> Better to use `enum class DiagnosticLevelMask`. You'll need to define
> operator| and operator|=, but those are trivial with std::underlying_type.

I would add `operator&(Enum, Enum)`, `operator|(Enum, Enum)` and `~operator(

I would prefer to use a enum class but there are a couple of problems:
1. You need to define a `raw_ostream operator<<(...)` function. This is 
required by the ENUM_DIAGOPT macro. 
2. `if (EnumValue & Enum::Value)`  doesn't work. You need the explicit bool 
cast which is ugly. 


================
Comment at: lib/Frontend/VerifyDiagnosticConsumer.cpp:750
@@ -747,1 +749,3 @@
 
+  DiagnosticLevelMask const IgnoredUnexpectedLevels =
+    Diags.getDiagnosticOptions().VerifyIgnoreUnexpected;
----------------
> Why bother making this const? Also, a name like DiagMask is probably clearer.

I like to make things const so I can't accidentally change it. I'm happy to 
change the name though.

http://reviews.llvm.org/D10138

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to