[clang] 19f1dc7 - Remove unneeded template alias, causes issues with some MSVC version

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 14:21:17 PDT 2019


Author: Reid Kleckner
Date: 2019-10-31T14:20:54-07:00
New Revision: 19f1dc7b527eade11dae9425c420cc9f450393b6

URL: https://github.com/llvm/llvm-project/commit/19f1dc7b527eade11dae9425c420cc9f450393b6
DIFF: https://github.com/llvm/llvm-project/commit/19f1dc7b527eade11dae9425c420cc9f450393b6.diff

LOG: Remove unneeded template alias, causes issues with some MSVC version

I built locally with the latest MSVC in c++14 and c++17, but it does not
complain for me. Osman Zakir on llvm-dev reports that they run into
compile errors here.

In any case, it seems prefereable to reuse clang's LLVM.h header to
bring in llvm::Optional and Expected.

Added: 
    

Modified: 
    clang/lib/AST/Interp/ByteCodeStmtGen.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
index c71301598bde..5b47489e65e0 100644
--- a/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
+++ b/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
@@ -14,13 +14,11 @@
 #include "PrimType.h"
 #include "Program.h"
 #include "State.h"
+#include "clang/Basic/LLVM.h"
 
 using namespace clang;
 using namespace clang::interp;
 
-template <typename T> using Expected = llvm::Expected<T>;
-template <typename T> using Optional = llvm::Optional<T>;
-
 namespace clang {
 namespace interp {
 


        


More information about the cfe-commits mailing list