jroelofs added inline comments.

================
Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:1
+// MmapWriteExecChecker.cpp - Check for the prot argument
+//
----------------
jroelofs wrote:
> Needs one of these at the top:
> 
> ```
> //===- MmapWriteExecChecker.cpp - Check the mmap prot argument 
> ---------------*- C++ -*-===//
> ```
> 
> Appropriately fitted to 80-cols.
The format of the first line is important because some people's syntax 
highlighters rely on it.


================
Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:29
+class MmapWriteExecChecker : public Checker<check::PostStmt<CallExpr>> {
+#ifdef __GLIBC__
+  static const int ProtWrite = 0x02;
----------------
This makes the checker's behavior depend on whether the host was built against 
glibc, however the target might not be the same as the host. You'll need to 
check the target's defines at checker-run-time, and not hardcode this.


Repository:
  rC Clang

https://reviews.llvm.org/D42645



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to