summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Ecc/Check.py
diff options
context:
space:
mode:
authorHess Chen <hesheng.chen@intel.com>2018-10-16 16:21:48 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-24 08:41:04 +0800
commit3a244b8db4e76a7c945b58f49746152dd8787172 (patch)
tree06532348741e73d573d9ac8737af8aee52793968 /BaseTools/Source/Python/Ecc/Check.py
parent33a211d0095575b35cba16a1a8c305588bf1d49a (diff)
downloadedk2-3a244b8db4e76a7c945b58f49746152dd8787172.tar.gz
edk2-3a244b8db4e76a7c945b58f49746152dd8787172.tar.bz2
edk2-3a244b8db4e76a7c945b58f49746152dd8787172.zip
BaseTools/ECC: Fix an identification issue of typedef function.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Ecc/Check.py')
-rw-r--r--BaseTools/Source/Python/Ecc/Check.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py
index 0491d2d4e4..268e02126c 100644
--- a/BaseTools/Source/Python/Ecc/Check.py
+++ b/BaseTools/Source/Python/Ecc/Check.py
@@ -646,13 +646,23 @@ class Check(object):
if EccGlobalData.gConfig.IncludeFileCheckData == '1' or EccGlobalData.gConfig.IncludeFileCheckAll == '1' or EccGlobalData.gConfig.CheckAll == '1':
EdkLogger.quiet("Checking header file data ...")
+ # Get all typedef functions
+ gAllTypedefFun = []
+ for IdentifierTable in EccGlobalData.gIdentifierTableList:
+ SqlCommand = """select Name from %s
+ where Model = %s """ % (IdentifierTable, MODEL_IDENTIFIER_TYPEDEF)
+ RecordSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
+ for Record in RecordSet:
+ if Record[0].startswith('('):
+ gAllTypedefFun.append(Record[0])
+
# for Dirpath, Dirnames, Filenames in self.WalkTree():
# for F in Filenames:
# if os.path.splitext(F)[1] in ('.h'):
# FullName = os.path.join(Dirpath, F)
# MsgList = c.CheckHeaderFileData(FullName)
for FullName in EccGlobalData.gHFileList:
- MsgList = c.CheckHeaderFileData(FullName)
+ MsgList = c.CheckHeaderFileData(FullName, gAllTypedefFun)
# Doxygen document checking
def DoxygenCheck(self):