sammccall added inline comments.

================
Comment at: clang-tools-extra/clangd/Selection.cpp:41
+const char *getLanguage(const clang::LangOptions &Lang) {
+  if (Lang.C99 || Lang.C11 || Lang.C17 || Lang.C2x)
+    return "C";
----------------
Testing for specific C versions seems a bit weird to me - what if we're in C89? 
I'm not sure what the intention is - if the idea is to exclude extensions like 
openmp I'm not sure this actually does that.
And by checking it before ObjC I think we're misclassifying `clang -std=c99 
foo.m`

I'd suggest checking (optionally objc++), objc, c++, and calling everything 
else C. If you really want to avoid particular dialects, probably best to name 
them specifically.


================
Comment at: clang-tools-extra/clangd/Selection.cpp:65
       RecoveryType.record(RE->isTypeDependent() ? 0 : 1);
+      RecoveryAvailable.record(1, getLanguage(AST.getLangOpts()));
       return;
----------------
I'm not clear what this is trying to measure - why isn't this the same metric 
as SelectionUsedRecovery (just adding a field to that one?)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92157/new/

https://reviews.llvm.org/D92157

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

Reply via email to