From c7645b926632a67137194dbe71eaa6a029dc0742 Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Mon, 14 Jul 2014 19:42:55 +0000 Subject: [PATCH] Fix typos Also consolidate 'backward compatibility' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212974 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LanguageExtensions.rst | 2 +- include/clang/Basic/arm_neon.td | 2 +- lib/Basic/Targets.cpp | 2 +- lib/Format/Format.cpp | 2 +- lib/Sema/SemaDeclAttr.cpp | 2 +- test/CodeGenCXX/dllexport.cpp | 2 +- test/CodeGenCXX/dllimport.cpp | 2 +- tools/libclang/CIndexDiagnostic.cpp | 2 +- tools/scan-build/sorttable.js | 2 +- utils/TableGen/NeonEmitter.cpp | 7 +++---- 10 files changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/LanguageExtensions.rst b/docs/LanguageExtensions.rst index ad7821af70..4c600868e9 100644 --- a/docs/LanguageExtensions.rst +++ b/docs/LanguageExtensions.rst @@ -91,7 +91,7 @@ feature) or 0 if not. They can be used like this: .. _langext-has-feature-back-compat: -For backwards compatibility reasons, ``__has_feature`` can also be used to test +For backward compatibility, ``__has_feature`` can also be used to test for support for non-standardized features, i.e. features not prefixed ``c_``, ``cxx_`` or ``objc_``. diff --git a/include/clang/Basic/arm_neon.td b/include/clang/Basic/arm_neon.td index f68ccea655..0247bb5dd0 100644 --- a/include/clang/Basic/arm_neon.td +++ b/include/clang/Basic/arm_neon.td @@ -87,7 +87,7 @@ def call; def cast; // bitcast - Same as "cast", except a reinterpret-cast is produced: // (bitcast "T", $p0) -> "*(T*)&__p0". -// The VAL argument is saved to a temprary so it can be used +// The VAL argument is saved to a temporary so it can be used // as an l-value. def bitcast; // dup - Take a scalar argument and create a vector by duplicating it into diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index c118c9c247..2a6623425b 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -5459,7 +5459,7 @@ public: case 'r': // CPU registers. case 'd': // Equivalent to "r" unless generating MIPS16 code. - case 'y': // Equivalent to "r", backwards compatibility only. + case 'y': // Equivalent to "r", backward compatibility only. case 'f': // floating-point registers. case 'c': // $25 for indirect jumps case 'l': // lo register diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index be9bbed9c4..58dd5604e4 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -104,7 +104,7 @@ struct ScalarEnumerationTraits { IO.enumCase(Value, "Left", FormatStyle::PAS_Left); IO.enumCase(Value, "Right", FormatStyle::PAS_Right); - // For backward compability. + // For backward compatibility. IO.enumCase(Value, "true", FormatStyle::PAS_Left); IO.enumCase(Value, "false", FormatStyle::PAS_Right); } diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 7674aa4854..c87942d033 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -3911,7 +3911,7 @@ static void handleCapabilityAttr(Sema &S, Decl *D, const AttributeList &Attr) { // concept, and so they use the same semantic attribute. Eventually, the // lockable attribute will be removed. // - // For backwards compatibility, any capability which has no specified string + // For backward compatibility, any capability which has no specified string // literal will be considered a "mutex." StringRef N("mutex"); SourceLocation LiteralLoc; diff --git a/test/CodeGenCXX/dllexport.cpp b/test/CodeGenCXX/dllexport.cpp index 197b18e9ad..d7ac3ae4f2 100644 --- a/test/CodeGenCXX/dllexport.cpp +++ b/test/CodeGenCXX/dllexport.cpp @@ -680,7 +680,7 @@ USEMEMFUNC(ExplicitlyImportInstantiatedTemplate, func) // MS: A dll attribute propagates through multiple levels of instantiation. template struct TopClass { void func() {} }; template struct MiddleClass : public TopClass { }; -struct __declspec(dllexport) BottomClas : public MiddleClass { }; +struct __declspec(dllexport) BottomClass : public MiddleClass { }; USEMEMFUNC(TopClass, func) // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$TopClass@H@@QAEXXZ" // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN8TopClassIiE4funcEv diff --git a/test/CodeGenCXX/dllimport.cpp b/test/CodeGenCXX/dllimport.cpp index d15eea24f2..93b5c82760 100644 --- a/test/CodeGenCXX/dllimport.cpp +++ b/test/CodeGenCXX/dllimport.cpp @@ -765,7 +765,7 @@ USEMEMFUNC(ExplicitlyImportInstantiatedTemplate, func) // MS: A dll attribute propagates through multiple levels of instantiation. template struct TopClass { void func() {} }; template struct MiddleClass : public TopClass { }; -struct __declspec(dllimport) BottomClas : public MiddleClass { }; +struct __declspec(dllimport) BottomClass : public MiddleClass { }; USEMEMFUNC(TopClass, func) // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$TopClass@H@@QAEXXZ" // G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN8TopClassIiE4funcEv diff --git a/tools/libclang/CIndexDiagnostic.cpp b/tools/libclang/CIndexDiagnostic.cpp index cb977ec3b1..0d97ebd933 100644 --- a/tools/libclang/CIndexDiagnostic.cpp +++ b/tools/libclang/CIndexDiagnostic.cpp @@ -412,7 +412,7 @@ unsigned clang_getDiagnosticCategory(CXDiagnostic Diag) { } CXString clang_getDiagnosticCategoryName(unsigned Category) { - // Kept for backwards compatibility. + // Kept for backward compatibility. return cxstring::createRef(DiagnosticIDs::getCategoryNameFromID(Category)); } diff --git a/tools/scan-build/sorttable.js b/tools/scan-build/sorttable.js index 03ebd92631..32faa078d8 100644 --- a/tools/scan-build/sorttable.js +++ b/tools/scan-build/sorttable.js @@ -55,7 +55,7 @@ sorttable = { // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, - // for backwards compatibility, move them to tfoot (creating it if needed). + // for backward compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; ihasSplat()) continue; - // Functions which do not have an immediate do not ned to have range - // checking - // code emitted. + // Functions which do not have an immediate do not need to have range + // checking code emitted. if (!Def->hasImmediate()) continue; if (Emitted.find(Def->getMangledName()) != Emitted.end()) @@ -2121,7 +2120,7 @@ NeonEmitter::genIntrinsicRangeCheckCode(raw_ostream &OS, UpperBound = utostr(Def->getReturnType().getElementSizeInBits() - 1); } else if (R->getValueAsBit("isShift")) { - // Builtins which are overloaded by type will need to have thier upper + // Builtins which are overloaded by type will need to have their upper // bound computed at Sema time based on the type constant. // Right shifts have an 'r' in the name, left shifts do not. -- 2.40.0