summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-11-10 23:34:34 +0100
committerMoonchild <moonchild@palemoon.org>2023-11-10 23:34:34 +0100
commitf9ad6258221d89d8ee8e543c2ff8b21a42dbd285 (patch)
tree70e65826e12ca2424c91f94c21447ddcaa9f4f67
parentc43a68113f85a66b827fdd059886f0aba23e1a55 (diff)
downloaduxp-f9ad6258221d89d8ee8e543c2ff8b21a42dbd285.tar.gz
Issue #2342 - Fix attribute order in misc files (found by clang builds)
-rw-r--r--dom/base/nsContentAreaDragDrop.cpp3
-rw-r--r--js/src/builtin/SymbolObject.h20
-rw-r--r--js/src/ds/InlineTable.h16
-rw-r--r--js/src/ds/LifoAlloc.h4
-rw-r--r--js/src/frontend/BytecodeEmitter.h4
-rw-r--r--js/src/wasm/WasmTextUtils.cpp8
6 files changed, 27 insertions, 28 deletions
diff --git a/dom/base/nsContentAreaDragDrop.cpp b/dom/base/nsContentAreaDragDrop.cpp
index 49aeb2a774..9e23767e96 100644
--- a/dom/base/nsContentAreaDragDrop.cpp
+++ b/dom/base/nsContentAreaDragDrop.cpp
@@ -84,8 +84,7 @@ private:
nsIContent **outImageOrLinkNode,
bool* outDragSelectedText);
static already_AddRefed<nsIContent> FindParentLinkNode(nsIContent* inNode);
- static [[nodiscard]] nsresult
- GetAnchorURL(nsIContent* inNode, nsAString& outURL);
+ [[nodiscard]] static nsresult GetAnchorURL(nsIContent* inNode, nsAString& outURL);
static void GetNodeString(nsIContent* inNode, nsAString & outNodeString);
static void CreateLinkText(const nsAString& inURL, const nsAString & inText,
nsAString& outLinkText);
diff --git a/js/src/builtin/SymbolObject.h b/js/src/builtin/SymbolObject.h
index 96d8010bdd..49f608583c 100644
--- a/js/src/builtin/SymbolObject.h
+++ b/js/src/builtin/SymbolObject.h
@@ -38,22 +38,22 @@ class SymbolObject : public NativeObject
setFixedSlot(PRIMITIVE_VALUE_SLOT, SymbolValue(symbol));
}
- static [[nodiscard]] bool construct(JSContext* cx, unsigned argc, Value* vp);
+ [[nodiscard]] static bool construct(JSContext* cx, unsigned argc, Value* vp);
// Static methods.
- static [[nodiscard]] bool for_(JSContext* cx, unsigned argc, Value* vp);
- static [[nodiscard]] bool keyFor(JSContext* cx, unsigned argc, Value* vp);
+ [[nodiscard]] static bool for_(JSContext* cx, unsigned argc, Value* vp);
+ [[nodiscard]] static bool keyFor(JSContext* cx, unsigned argc, Value* vp);
// Methods defined on Symbol.prototype.
- static [[nodiscard]] bool toString_impl(JSContext* cx, const CallArgs& args);
- static [[nodiscard]] bool toString(JSContext* cx, unsigned argc, Value* vp);
- static [[nodiscard]] bool valueOf_impl(JSContext* cx, const CallArgs& args);
- static [[nodiscard]] bool valueOf(JSContext* cx, unsigned argc, Value* vp);
- static [[nodiscard]] bool toPrimitive(JSContext* cx, unsigned argc, Value* vp);
+ [[nodiscard]] static bool toString_impl(JSContext* cx, const CallArgs& args);
+ [[nodiscard]] static bool toString(JSContext* cx, unsigned argc, Value* vp);
+ [[nodiscard]] static bool valueOf_impl(JSContext* cx, const CallArgs& args);
+ [[nodiscard]] static bool valueOf(JSContext* cx, unsigned argc, Value* vp);
+ [[nodiscard]] static bool toPrimitive(JSContext* cx, unsigned argc, Value* vp);
// Properties defined on Symbol.prototype.
- static [[nodiscard]] bool descriptionGetter_impl(JSContext* cx, const CallArgs& args);
- static [[nodiscard]] bool descriptionGetter(JSContext* cx, unsigned argc, Value *vp);
+ [[nodiscard]] static bool descriptionGetter_impl(JSContext* cx, const CallArgs& args);
+ [[nodiscard]] static bool descriptionGetter(JSContext* cx, unsigned argc, Value *vp);
static const JSPropertySpec properties[];
static const JSFunctionSpec methods[];
diff --git a/js/src/ds/InlineTable.h b/js/src/ds/InlineTable.h
index 5793e78533..26ba284f0e 100644
--- a/js/src/ds/InlineTable.h
+++ b/js/src/ds/InlineTable.h
@@ -90,8 +90,8 @@ class InlineTable
return true;
}
- MOZ_NEVER_INLINE
- [[nodiscard]] bool switchAndAdd(const InlineEntry& entry) {
+ [[nodiscard]] MOZ_NEVER_INLINE
+ bool switchAndAdd(const InlineEntry& entry) {
if (!switchToTable())
return false;
@@ -284,8 +284,8 @@ class InlineTable
template <typename KeyInput,
typename... Args>
- MOZ_ALWAYS_INLINE
- [[nodiscard]] bool add(AddPtr& p, KeyInput&& key, Args&&... args) {
+ [[nodiscard]] MOZ_ALWAYS_INLINE
+ bool add(AddPtr& p, KeyInput&& key, Args&&... args) {
MOZ_ASSERT(!p);
MOZ_ASSERT(keyNonZero(key));
@@ -530,8 +530,8 @@ class InlineMap
}
template <typename KeyInput, typename ValueInput>
- MOZ_ALWAYS_INLINE
- [[nodiscard]] bool add(AddPtr& p, KeyInput&& key, ValueInput&& value) {
+ [[nodiscard]] MOZ_ALWAYS_INLINE
+ bool add(AddPtr& p, KeyInput&& key, ValueInput&& value) {
return impl_.add(p, mozilla::Forward<KeyInput>(key), mozilla::Forward<ValueInput>(value));
}
@@ -661,8 +661,8 @@ class InlineSet
}
template <typename TInput>
- MOZ_ALWAYS_INLINE
- [[nodiscard]] bool add(AddPtr& p, TInput&& key) {
+ [[nodiscard]] MOZ_ALWAYS_INLINE
+ bool add(AddPtr& p, TInput&& key) {
return impl_.add(p, mozilla::Forward<TInput>(key));
}
diff --git a/js/src/ds/LifoAlloc.h b/js/src/ds/LifoAlloc.h
index 1c64dd44d9..0e4e544cad 100644
--- a/js/src/ds/LifoAlloc.h
+++ b/js/src/ds/LifoAlloc.h
@@ -312,8 +312,8 @@ class LifoAlloc
// Ensures that enough space exists to satisfy N bytes worth of
// allocation requests, not necessarily contiguous. Note that this does
// not guarantee a successful single allocation of N bytes.
- MOZ_ALWAYS_INLINE
- [[nodiscard]] bool ensureUnusedApproximate(size_t n) {
+ [[nodiscard]] MOZ_ALWAYS_INLINE
+ bool ensureUnusedApproximate(size_t n) {
AutoFallibleScope fallibleAllocator(this);
size_t total = 0;
for (BumpChunk* chunk = latest; chunk; chunk = chunk->next()) {
diff --git a/js/src/frontend/BytecodeEmitter.h b/js/src/frontend/BytecodeEmitter.h
index 0ce4f6c1a3..aef575b1cd 100644
--- a/js/src/frontend/BytecodeEmitter.h
+++ b/js/src/frontend/BytecodeEmitter.h
@@ -299,8 +299,8 @@ struct MOZ_STACK_CLASS BytecodeEmitter
Scope* outermostScope() const { return scopeList.vector[0]; }
Scope* innermostScope() const;
- MOZ_ALWAYS_INLINE
- [[nodiscard]] bool makeAtomIndex(JSAtom* atom, uint32_t* indexp) {
+ [[nodiscard]] MOZ_ALWAYS_INLINE
+ bool makeAtomIndex(JSAtom* atom, uint32_t* indexp) {
MOZ_ASSERT(atomIndices);
AtomIndexMap::AddPtr p = atomIndices->lookupForAdd(atom);
if (p) {
diff --git a/js/src/wasm/WasmTextUtils.cpp b/js/src/wasm/WasmTextUtils.cpp
index b09504fa2b..5cff1c9ce1 100644
--- a/js/src/wasm/WasmTextUtils.cpp
+++ b/js/src/wasm/WasmTextUtils.cpp
@@ -27,7 +27,7 @@ using namespace js::jit;
using mozilla::IsNaN;
template<size_t base>
-bool
+[[nodiscard]] bool
js::wasm::RenderInBase(StringBuffer& sb, uint64_t num)
{
uint64_t n = num;
@@ -52,7 +52,7 @@ js::wasm::RenderInBase(StringBuffer& sb, uint64_t num)
template bool js::wasm::RenderInBase<10>(StringBuffer& sb, uint64_t num);
template<class T>
-bool
+[[nodiscard]] bool
js::wasm::RenderNaN(StringBuffer& sb, Raw<T> num)
{
typedef typename mozilla::FloatingPoint<T> Traits;
@@ -73,5 +73,5 @@ js::wasm::RenderNaN(StringBuffer& sb, Raw<T> num)
RenderInBase<16>(sb, payload);
}
-template [[nodiscard]] bool js::wasm::RenderNaN(StringBuffer& b, Raw<float> num);
-template [[nodiscard]] bool js::wasm::RenderNaN(StringBuffer& b, Raw<double> num);
+template bool js::wasm::RenderNaN(StringBuffer& b, Raw<float> num);
+template bool js::wasm::RenderNaN(StringBuffer& b, Raw<double> num);