diff options
author | Dan Gohman <gohman@apple.com> | 2008-02-20 16:44:09 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-02-20 16:44:09 +0000 |
commit | b5660dc8223bd5eb3d21d9855692617fcdec5663 (patch) | |
tree | efe20b5ad260ba442785f90afb2a408febd04e71 /include/llvm | |
parent | 948d8eadec92cc5f31f196de41dd6dfe8579a0c6 (diff) | |
download | external_llvm-b5660dc8223bd5eb3d21d9855692617fcdec5663.tar.gz external_llvm-b5660dc8223bd5eb3d21d9855692617fcdec5663.tar.bz2 external_llvm-b5660dc8223bd5eb3d21d9855692617fcdec5663.zip |
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Support/Annotation.h | 6 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/ConstantRange.h | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Support/Annotation.h b/include/llvm/Support/Annotation.h index 4a53ff59a9..2be1c10616 100644 --- a/include/llvm/Support/Annotation.h +++ b/include/llvm/Support/Annotation.h @@ -43,7 +43,9 @@ class AnnotationID { unsigned ID; AnnotationID(); // Default ctor is disabled - inline AnnotationID(unsigned i) : ID(i) {} // Only creatable from AnnMgr + + // AnnotationID is only creatable from AnnMgr. + explicit inline AnnotationID(unsigned i) : ID(i) {} public: inline AnnotationID(const AnnotationID &A) : ID(A.ID) {} @@ -67,7 +69,7 @@ class Annotation { AnnotationID ID; // ID number, as obtained from AnnotationManager Annotation *Next; // The next annotation in the linked list public: - inline Annotation(AnnotationID id) : ID(id), Next(0) {} + explicit inline Annotation(AnnotationID id) : ID(id), Next(0) {} virtual ~Annotation(); // Designed to be subclassed // getID - Return the unique ID# of this annotation diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 1392e334ac..0f804395c3 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -1316,7 +1316,7 @@ struct aliasopt { // exit is called. struct extrahelp { const char * morehelp; - extrahelp(const char* help); + explicit extrahelp(const char* help); }; void PrintVersionMessage(); diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h index 6fb56b3b25..2e477cf899 100644 --- a/include/llvm/Support/ConstantRange.h +++ b/include/llvm/Support/ConstantRange.h @@ -44,7 +44,7 @@ class ConstantRange { public: /// Initialize a full (the default) or empty set for the specified bit width. /// - ConstantRange(uint32_t BitWidth, bool isFullSet = true); + explicit ConstantRange(uint32_t BitWidth, bool isFullSet = true); /// Initialize a range to hold the single specified value. /// |