python3kgae added inline comments.

================
Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:55
+      } else
+        PrevDecl = dyn_cast<CXXRecordDecl>(Found);
+      assert(PrevDecl && "Unexpected lookup result type.");
----------------
aaron.ballman wrote:
> Is it possible that this finds a different kind of tag, like an enumeration?
No, enum with the same name will get an error when building the PCH.


================
Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:378
+  if (S.LookupQualifiedName(Result, AST.getTranslationUnitDecl()))
+    PrevDecl = Result.getAsSingle<NamespaceDecl>();
+  HLSLNamespace = NamespaceDecl::Create(AST, AST.getTranslationUnitDecl(),
----------------
aaron.ballman wrote:
> How certain are you that there's only one result possible here?
I cannot think of a case more than one result is here.



================
Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:459-461
+  ASTContext &AST = SemaPtr->getASTContext();
+  IdentifierInfo &II = AST.Idents.get("Resource", tok::TokenKind::identifier);
+  LookupResult Result(*SemaPtr, &II, SourceLocation(), Sema::LookupTagName);
----------------
aaron.ballman wrote:
> We made a lookup result but then do nothing with it?
Removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132421

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

Reply via email to