[PATCH] D25704: [CUDA] When we emit an error that might have been deferred, also print a callstack.

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 09:36:21 PDT 2016


rnk added inline comments.


================
Comment at: clang/include/clang/Sema/Sema.h:9292
+  llvm::DenseMap</* Caller = */ CanonicalDeclPtr<FunctionDecl>,
+                 /* Callees = */ llvm::SetVector<FunctionDeclAndLoc>>
+      CUDACallGraph;
----------------
Rather than having a custom key type, maybe it would be better to phrase this as a `MapVector<CanonicalDeclPtr<FunctionDecl>, SourceLocation>` ? Despite all the comments, I assumed FunctionDeclAndLoc was hashed by both elements for a long time.


================
Comment at: clang/include/clang/Sema/Sema.h:9322
+      /// it's attached to is codegen'ed.  Also emit a call stack as with
+      /// K_ImmedaiteWithCallStack.
       K_Deferred
----------------
typo on "immediate"


https://reviews.llvm.org/D25704





More information about the cfe-commits mailing list