diff options
author | Michael Kruse <llvm@meinersbur.de> | 2017-05-24 15:09:35 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2017-05-24 15:09:35 +0000 |
commit | cb58bd6ccdf9d2bbbf021599c92a74f776feee40 (patch) | |
tree | 2d95a1b76ec1890dd9a8e71ea20971a95037c6d9 /clang/lib/Sema/SemaChecking.cpp | |
parent | b07351f4f87ff31373bd5d8321569736117a7c90 (diff) | |
download | llvm-cb58bd6ccdf9d2bbbf021599c92a74f776feee40.zip llvm-cb58bd6ccdf9d2bbbf021599c92a74f776feee40.tar.gz llvm-cb58bd6ccdf9d2bbbf021599c92a74f776feee40.tar.bz2 |
[JSONImporter] misses checks whether the data it imports makes sense.
Without this patch, the JSONImporter did not verify if the data it loads
were correct or not (Bug llvm.org/PR32543). I add some checks in the
JSONImporter class and some test cases.
Here are the checks (and test cases) I added :
JSONImporter::importContext
- The "context" key does not exist.
- The context was not parsed successfully by ISL.
- The isl_set has the wrong number of parameters.
- The isl_set is not a parameter set.
JSONImporter::importSchedule
- The "statements" key does not exist.
- There is not the right number of statement in the file.
- The "schedule" key does not exist.
- The schedule was not parsed successfully by ISL.
JSONImporter::importAccesses
- The "statements" key does not exist.
- There is not the right number of statement in the file.
- The "accesses" key does not exist.
- There is not the right number of memory accesses in the file.
- The "relation" key does not exist.
- The memory access was not parsed successfully by ISL.
JSONImporter::areArraysEqual
- The "type" key does not exist.
- The "sizes" key does not exist.
- The "name" key does not exist.
JSONImporter::importArrays
/!\ Do not check if there is an key name "arrays" because it is not
considered as an error.
All checks are already in place or implemented in
JSONImporter::areArraysEqual.
Contributed-by: Nicolas Bonfante <nicolas.bonfante@insa-lyon.fr>
Differential Revision: https://reviews.llvm.org/D32739
llvm-svn: 303759
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
0 files changed, 0 insertions, 0 deletions