[llvm] 522712e - [Option] Remove the error-prone default argument true from 3-argument hasFlag

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 26 00:58:42 PDT 2022


Author: Fangrui Song
Date: 2022-03-26T00:58:39-07:00
New Revision: 522712e2d241ea33575a9c7a60ad582634f04f0d

URL: https://github.com/llvm/llvm-project/commit/522712e2d241ea33575a9c7a60ad582634f04f0d
DIFF: https://github.com/llvm/llvm-project/commit/522712e2d241ea33575a9c7a60ad582634f04f0d.diff

LOG: [Option] Remove the error-prone default argument true from 3-argument hasFlag

Added: 
    

Modified: 
    llvm/include/llvm/Option/ArgList.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Option/ArgList.h b/llvm/include/llvm/Option/ArgList.h
index 74897de52a935..e19ecec573226 100644
--- a/llvm/include/llvm/Option/ArgList.h
+++ b/llvm/include/llvm/Option/ArgList.h
@@ -298,7 +298,7 @@ class ArgList {
   /// true if the option is present, false if the negation is present, and
   /// \p Default if neither option is given. If both the option and its
   /// negation are present, the last one wins.
-  bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const;
+  bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default) const;
 
   /// hasFlag - Given an option \p Pos, an alias \p PosAlias and its negative
   /// form \p Neg, return true if the option or its alias is present, false if


        


More information about the llvm-commits mailing list