erichkeane added a comment.
@chapuni Thanks for the fix! That 'novtable' line is there simply because that
is supposed to be a minimized replica of what happens in the UnknwnBase.h
header.
I'll likely just remove the attribute and your fix, since the warning itself
isn't important to the test
chapuni added a comment.
Appeased in https://reviews.llvm.org/rL314586. I don't think my tweak would be
right, though.
See;
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/6726
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/5135
This revision was automatically updated to reflect the committed changes.
Closed by commit rL314557: [Sema] Correct IUnknown to support Unknwnbase.h
Header. (authored by erichkeane).
Changed prior to commit:
https://reviews.llvm.org/D38303?vs=116876&id=117218#toc
Repository:
rL LLVM
https:/
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
Comment at: lib/AST/DeclCXX.cpp:1473
+static bool IsDeclContextInNamespace(const DeclContext *DC) {
+ while (!DC->isTranslationUnit()) {
Lower case `isDecl
erichkeane updated this revision to Diff 116876.
erichkeane added a comment.
As @rnk suggested, pull my condition out into a static function.
https://reviews.llvm.org/D38303
Files:
lib/AST/DeclCXX.cpp
test/SemaCXX/ms-iunknown-template-function.cpp
test/SemaCXX/ms-iunknown.cpp
Index: lib/
rnk added inline comments.
Comment at: lib/AST/DeclCXX.cpp:1497-1505
+ bool IsInNamespace = false;
+ const auto *DeclContext = getDeclContext();
+ while (!DeclContext->isTranslationUnit()) {
+if (DeclContext->isNamespace()) {
+ IsInNamespace = true;
+ break;
+