[llvm] 0d908e1 - Make FileCheckNumericVariable::getDefLineNumber const. NFC

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 10:55:59 PST 2019


Author: Simon Pilgrim
Date: 2019-11-11T18:51:45Z
New Revision: 0d908e1252d4b1de4bdd91e2a2857093621b2a0b

URL: https://github.com/llvm/llvm-project/commit/0d908e1252d4b1de4bdd91e2a2857093621b2a0b
DIFF: https://github.com/llvm/llvm-project/commit/0d908e1252d4b1de4bdd91e2a2857093621b2a0b.diff

LOG: Make FileCheckNumericVariable::getDefLineNumber const. NFC

Fixes cppcheck warning.

Added: 
    

Modified: 
    llvm/lib/Support/FileCheckImpl.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/FileCheckImpl.h b/llvm/lib/Support/FileCheckImpl.h
index 06ce8301cec4..0fd8523bef8f 100644
--- a/llvm/lib/Support/FileCheckImpl.h
+++ b/llvm/lib/Support/FileCheckImpl.h
@@ -114,7 +114,7 @@ class FileCheckNumericVariable {
 
   /// \returns the line number where this variable is defined, if any, or None
   /// if defined before input is parsed.
-  Optional<size_t> getDefLineNumber() { return DefLineNumber; }
+  Optional<size_t> getDefLineNumber() const { return DefLineNumber; }
 };
 
 /// Class representing the use of a numeric variable in the AST of an


        


More information about the llvm-commits mailing list