@@ -4653,6 +4653,23 @@ def CheckAssert(filename, clean_lines, linenum, error):
4653
4653
4654
4654
4655
4655
4656
+ def Check__CPROVER_ (filename , clean_lines , linenum , error ):
4657
+ """Check for uses of __CPROVER_.
4658
+
4659
+ Args:
4660
+ filename: The name of the current file.
4661
+ clean_lines: A CleansedLines instance containing the file.
4662
+ linenum: The number of the line to check.
4663
+ error: The function to call with any errors found.
4664
+ """
4665
+ line = clean_lines .lines [linenum ]
4666
+ match = Match (r'.*__CPROVER_.*' , line )
4667
+ if match :
4668
+ error (filename , linenum , 'build/deprecated' , 4 ,
4669
+ 'use CPROVER_PREFIX instead of __CPROVER_' )
4670
+
4671
+
4672
+
4656
4673
def GetLineWidth (line ):
4657
4674
"""Determines the width of the line in column positions.
4658
4675
@@ -4880,6 +4897,7 @@ def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state,
4880
4897
#CheckCheck(filename, clean_lines, linenum, error)
4881
4898
CheckAltTokens (filename , clean_lines , linenum , error )
4882
4899
CheckAssert (filename , clean_lines , linenum , error )
4900
+ Check__CPROVER_ (filename , clean_lines , linenum , error )
4883
4901
classinfo = nesting_state .InnermostClass ()
4884
4902
if classinfo :
4885
4903
CheckSectionSpacing (filename , clean_lines , classinfo , linenum , error )
0 commit comments