[Lldb-commits] [lldb] r373339 - [lldb][NFC] Mark ClangASTContext constructor as explicit

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 1 06:45:06 PDT 2019


Author: teemperor
Date: Tue Oct  1 06:45:06 2019
New Revision: 373339

URL: http://llvm.org/viewvc/llvm-project?rev=373339&view=rev
Log:
[lldb][NFC] Mark ClangASTContext constructor as explicit

Given that we can implicitly construct a ClangASTContext from any string, we should
really mark this as explicit.

Modified:
    lldb/trunk/include/lldb/Symbol/ClangASTContext.h

Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=373339&r1=373338&r2=373339&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Tue Oct  1 06:45:06 2019
@@ -52,7 +52,7 @@ public:
   }
 
   // Constructors and Destructors
-  ClangASTContext(llvm::StringRef triple = "");
+  explicit ClangASTContext(llvm::StringRef triple = "");
 
   /// Constructs a ClangASTContext that uses an existing ASTContext internally.
   /// Useful when having an existing ASTContext created by Clang.




More information about the lldb-commits mailing list