aaron.ballman added a comment.

I am a bit confused by what this check is trying to accomplish. It seems like 
this is intended to catch use of anything declared within the standard library, 
but that includes library support things that are needed to write useful code. 
For instance, it seems this means users cannot use initializer lists or type 
traits. I'm not even certain users can overload `operator new()` because that 
uses `std::size_t` as an argument.

Can you expound on the requirements in a bit more detail? Is it truly "no 
standard library functionality at all, including things required to be 
supported in freestanding implementations"?



================
Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:57-60
+  Finder->addMatcher(callExpr(callee(functionDecl(hasDeclContext(
+                                  namespaceDecl(isStdNamespace())))))
+                         .bind("stdCall"),
+                     this);
----------------
Is the intention here to diagnose code like this?
```
#include <cstdlib>

int main() {
  abort(); // Diagnose this?
}
```


https://reviews.llvm.org/D53882



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

Reply via email to