1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/include/llvm/ADT
George Rimar a4b2f4a4c1 [MC] - Don't assert when non-english characters are used.
I found that llvm-mc does not like non-english characters even in comments,
which it tries to tokenize.

Problem happens because of functions like isdigit(), isalnum() which takes
int argument and expects it is not negative.
But at the same time MCParser uses char* to store input buffer poiner, char has signed value,
so it is possible to pass negative value to one of functions from above and
that triggers an assert. 
Testcase for demonstration is provided.

To fix the issue helper functions were introduced in StringExtras.h

Differential revision: https://reviews.llvm.org/D38461

llvm-svn: 314883
2017-10-04 08:50:08 +00:00
..
AllocatorList.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
APFloat.h [APFloat] Move the integerPartWidth constant into APFloatBase. Remove integerPart typedef at file scope and just use the one in APFloatBase everywhere. NFC 2017-06-18 18:15:41 +00:00
APInt.h [APInt] Use getActiveBits() to implement logBase2 and ceilLogBase2. NFC 2017-09-20 18:49:31 +00:00
APSInt.h [APInt] Add ashrInPlace method and rewrite ashr to make a copy and then call ashrInPlace. 2017-04-24 17:18:47 +00:00
ArrayRef.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
BitmaskEnum.h
BitVector.h [ADT] Revert r305326 changes in BitVector.h to fix broken builds. 2017-06-13 22:32:38 +00:00
BreadthFirstIterator.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
CachedHashString.h
DAGDeltaAlgorithm.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
DeltaAlgorithm.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
DenseMap.h [ADT] Enable reverse iteration for DenseMap 2017-08-24 23:02:48 +00:00
DenseMapInfo.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
DenseSet.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
DepthFirstIterator.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
edit_distance.h
EpochTracker.h
EquivalenceClasses.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
FoldingSet.h [ADT] Add type-safe methods to FoldingSetImpl; NFC. 2017-06-12 22:08:08 +00:00
GraphTraits.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
Hashing.h
ilist_base.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
ilist_iterator.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
ilist_node_base.h
ilist_node_options.h
ilist_node.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
ilist.h
ImmutableList.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
ImmutableMap.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
ImmutableSet.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
IndexedMap.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
IntEqClasses.h
IntervalMap.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
IntrusiveRefCntPtr.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
iterator_range.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
iterator.h fix 80 column violation. 2017-09-29 22:46:22 +00:00
MapVector.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
None.h
Optional.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
PackedVector.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
PointerEmbeddedInt.h PointerLikeTypeTraits: class->struct & remove the base definition 2017-08-09 18:34:21 +00:00
PointerIntPair.h PointerLikeTypeTraits: class->struct & remove the base definition 2017-08-09 18:34:21 +00:00
PointerSumType.h Revert "[ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC)." 2017-05-19 02:56:37 +00:00
PointerUnion.h PointerLikeTypeTraits: class->struct & remove the base definition 2017-08-09 18:34:21 +00:00
PostOrderIterator.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PriorityQueue.h
PriorityWorklist.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SCCIterator.h [SCCIterator] Garbage collect dead code. NFC. 2017-06-06 23:41:12 +00:00
ScopedHashTable.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
ScopeExit.h
Sequence.h [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-16 23:10:25 +00:00
SetOperations.h
SetVector.h [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-16 23:10:25 +00:00
simple_ilist.h [ADT] Partial re-commit of r303383. Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-14 21:42:24 +00:00
SmallBitVector.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
SmallPtrSet.h [ADT] Enable reverse iteration for DenseMap 2017-08-24 23:02:48 +00:00
SmallSet.h [ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-13 22:11:49 +00:00
SmallString.h
SmallVector.h Support, IR, ADT: Check nullptr after allocation with malloc/realloc or calloc 2017-07-20 01:30:39 +00:00
SparseBitVector.h [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-16 23:10:25 +00:00
SparseMultiSet.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SparseSet.h [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-16 23:10:25 +00:00
Statistic.h [Statistics] Add a method to atomically update a statistic that contains a maximum 2017-05-18 00:51:39 +00:00
STLExtras.h Remove usages of deprecated std::unary_function and std::binary_function. 2017-09-14 18:33:25 +00:00
StringExtras.h [MC] - Don't assert when non-english characters are used. 2017-10-04 08:50:08 +00:00
StringMap.h Support, IR, ADT: Check nullptr after allocation with malloc/realloc or calloc 2017-07-20 01:30:39 +00:00
StringRef.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
StringSet.h [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-16 23:10:25 +00:00
StringSwitch.h
TinyPtrVector.h [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-16 23:10:25 +00:00
Triple.h [Triple] Add AMDPAL operating system type 2017-09-29 09:48:12 +00:00
Twine.h
UniqueVector.h [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC). 2017-05-16 23:10:25 +00:00
VariadicFunction.h