Title: [207542] trunk/Source/_javascript_Core
Revision
207542
Author
m...@apple.com
Date
2016-10-19 10:18:27 -0700 (Wed, 19 Oct 2016)

Log Message

[Xcode] _javascript_Core fails to build when CLANG_WARN_DOCUMENTATION_COMMENTS is enabled
https://bugs.webkit.org/show_bug.cgi?id=163642

Reviewed by Darin Adler.

* API/JSClassRef.cpp: Removed a bad headerdoc comment inside an implementation file.
* API/JSContext.h: Changed @methodgroup to @functiongroup, because the compiler requires the
  former to be followed by a method (and we have a property), but not the latter. Changed
  a couple of instances of “method” to “@method”. Removed empty @param entries.
* API/JSContextRefInternal.h: Named a parameter referenced in a @param entry.
* API/JSContextRefPrivate.h: Ditto.
* API/JSManagedValue.h: Removed empty @param entries.
* API/JSObjectRef.h: Corrected parameter name in @param entry.
* API/JSTypedArray.h: Ditto.
* API/JSValue.h: Removed empty @param entries, changed @methodgroup to @functiongroup, and
  changed @method to @property where appropriate. Removed empty @param entries.
* API/JSValueRef.h: Named a parameter referenced in a @param entry.
* API/JSWeakObjectMapRefPrivate.h: Ditto.
* Configurations/Base.xcconfig: Enabled CLANG_WARN_DOCUMENTATION_COMMENTS. Made the compiler
  treat the icu headers as system headers, to stop it from emitting warnings about headers
  we don’t want to change.
* Configurations/ToolExecutable.xcconfig: Made the compiler treat the icu headers as system
  headers.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/JSClassRef.cpp (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSClassRef.cpp	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSClassRef.cpp	2016-10-19 17:18:27 UTC (rev 207542)
@@ -174,14 +174,6 @@
     return contextData(exec).staticFunctions.get();
 }
 
-/*!
-// Doc here in case we make this public. (Hopefully we won't.)
-@function
- @abstract Returns the prototype that will be used when constructing an object with a given class.
- @param ctx The execution context to use.
- @param jsClass A JSClass whose prototype you want to get.
- @result The JSObject prototype that was automatically generated for jsClass, or NULL if no prototype was automatically generated. This is the prototype that will be used when constructing an object using jsClass.
-*/
 JSObject* OpaqueJSClass::prototype(ExecState* exec)
 {
     /* Class (C++) and prototype (JS) inheritance are parallel, so:

Modified: trunk/Source/_javascript_Core/API/JSContext.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSContext.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSContext.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -125,8 +125,9 @@
 + (NSArray *)currentArguments;
 
 /*!
-@methodgroup Global Properties
+@functiongroup Global Properties
 */
+
 /*!
 @property
 @abstract Get the global object of the context.
@@ -197,18 +198,15 @@
 @interface JSContext (SubscriptSupport)
 
 /*!
-method
+@method
 @abstract Get a particular property on the global object.
-@param key
 @result The JSValue for the global object's property.
 */
 - (JSValue *)objectForKeyedSubscript:(id)key;
 
 /*!
-method
+@method
 @abstract Set a particular property on the global object.
-@param object
-@param key
 */
 - (void)setObject:(id)object forKeyedSubscript:(NSObject <NSCopying> *)key;
 
@@ -223,7 +221,6 @@
 /*!
 @method
 @abstract Create a JSContext, wrapping its C API counterpart.
-@param jsGlobalContextRef
 @result The JSContext equivalent of the provided JSGlobalContextRef.
 */
 + (JSContext *)contextWithJSGlobalContextRef:(JSGlobalContextRef)jsGlobalContextRef;

Modified: trunk/Source/_javascript_Core/API/JSContextRefInternal.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSContextRefInternal.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSContextRefInternal.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -50,7 +50,7 @@
 @param ctx The JSGlobalContext that you want to change.
 @param runLoop The new value of the setting for the context.
 */
-JS_EXPORT void JSGlobalContextSetDebuggerRunLoop(JSGlobalContextRef ctx, CFRunLoopRef) CF_AVAILABLE(10_10, 8_0);
+JS_EXPORT void JSGlobalContextSetDebuggerRunLoop(JSGlobalContextRef ctx, CFRunLoopRef runLoop) CF_AVAILABLE(10_10, 8_0);
 #endif
 
 #ifdef __cplusplus

Modified: trunk/Source/_javascript_Core/API/JSContextRefPrivate.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSContextRefPrivate.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSContextRefPrivate.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -85,7 +85,7 @@
  need to call JSContextGroupSetExecutionTimeLimit before you start executing
  any scripts.
 */
-JS_EXPORT void JSContextGroupSetExecutionTimeLimit(JSContextGroupRef, double limit, JSShouldTerminateCallback, void* context) CF_AVAILABLE(10_6, 7_0);
+JS_EXPORT void JSContextGroupSetExecutionTimeLimit(JSContextGroupRef group, double limit, JSShouldTerminateCallback callback, void* context) CF_AVAILABLE(10_6, 7_0);
 
 /*!
 @function
@@ -92,7 +92,7 @@
 @abstract Clears the script execution time limit.
 @param group The _javascript_ context group that the time limit is cleared on.
 */
-JS_EXPORT void JSContextGroupClearExecutionTimeLimit(JSContextGroupRef) CF_AVAILABLE(10_6, 7_0);
+JS_EXPORT void JSContextGroupClearExecutionTimeLimit(JSContextGroupRef group) CF_AVAILABLE(10_6, 7_0);
 
 /*!
 @function
@@ -124,7 +124,7 @@
 @function
 @abstract Sets the include native call stack when reporting exceptions setting for a context.
 @param ctx The JSGlobalContext that you want to change.
-@param includeNativeCallStack The new value of the setting for the context.
+@param includesNativeCallStack The new value of the setting for the context.
 */
 JS_EXPORT void JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions(JSGlobalContextRef ctx, bool includesNativeCallStack) CF_AVAILABLE(10_10, 8_0);
 

Modified: trunk/Source/_javascript_Core/API/JSManagedValue.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSManagedValue.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSManagedValue.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -54,7 +54,6 @@
 /*!
 @method
 @abstract Create a JSManagedValue from a JSValue.
-@param value
 @result The new JSManagedValue.
 */
 + (JSManagedValue *)managedValueWithValue:(JSValue *)value;
@@ -63,7 +62,6 @@
 /*!
 @method
 @abstract Create a JSManagedValue.
-@param value
 @result The new JSManagedValue.
 */
 - (instancetype)initWithValue:(JSValue *)value;

Modified: trunk/Source/_javascript_Core/API/JSObjectRef.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSObjectRef.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSObjectRef.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -186,7 +186,7 @@
 @abstract The callback invoked when collecting the names of an object's properties.
 @param ctx The execution context to use.
 @param object The JSObject whose property names are being collected.
-@param accumulator A _javascript_ property name accumulator in which to accumulate the names of object's properties.
+@param propertyNames A _javascript_ property name accumulator in which to accumulate the names of object's properties.
 @discussion If you named your function GetPropertyNames, you would declare it like this:
 
 void GetPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames);

Modified: trunk/Source/_javascript_Core/API/JSTypedArray.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSTypedArray.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSTypedArray.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -156,7 +156,7 @@
 /*!
  @function
  @abstract         Returns a pointer to the data buffer that serves as the backing store for a _javascript_ Typed Array object.
- @param buffer     The Array Buffer object whose internal backing store pointer to return.
+ @param object     The Array Buffer object whose internal backing store pointer to return.
  @param exception  A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
  @result           A pointer to the raw data buffer that serves as object's backing store or NULL if object is not an Array Buffer object.
  @discussion       The pointer returned by this function is temporary and is not guaranteed to remain valid across _javascript_Core API calls.

Modified: trunk/Source/_javascript_Core/API/JSValue.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSValue.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSValue.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -68,7 +68,6 @@
 /*!
 @method
 @abstract Create a _javascript_ value from a BOOL primitive.
-@param value
 @param context The JSContext in which the resulting JSValue will be created.
 @result The new JSValue representing the equivalent boolean value.
 */
@@ -77,7 +76,6 @@
 /*!
 @method
 @abstract Create a _javascript_ value from a double primitive.
-@param value
 @param context The JSContext in which the resulting JSValue will be created.
 @result The new JSValue representing the equivalent boolean value.
 */
@@ -86,7 +84,6 @@
 /*!
 @method
 @abstract Create a _javascript_ value from an <code>int32_t</code> primitive.
-@param value
 @param context The JSContext in which the resulting JSValue will be created.
 @result The new JSValue representing the equivalent boolean value.
 */
@@ -95,7 +92,6 @@
 /*!
 @method
 @abstract Create a _javascript_ value from a <code>uint32_t</code> primitive.
-@param value
 @param context The JSContext in which the resulting JSValue will be created.
 @result The new JSValue representing the equivalent boolean value.
 */
@@ -364,28 +360,29 @@
 - (void)setValue:(id)value atIndex:(NSUInteger)index;
 
 /*!
-@methodgroup Checking _javascript_ Types
+@functiongroup Checking _javascript_ Types
 */
+
 /*!
-@method
+@property
 @abstract Check if a JSValue corresponds to the _javascript_ value <code>undefined</code>.
 */ 
 @property (readonly) BOOL isUndefined;
 
 /*!
-@method
+@property
 @abstract Check if a JSValue corresponds to the _javascript_ value <code>null</code>.
 */
 @property (readonly) BOOL isNull;
 
 /*!
-@method
+@property
 @abstract Check if a JSValue is a boolean.
 */
 @property (readonly) BOOL isBoolean;
 
 /*!
-@method
+@property
 @abstract Check if a JSValue is a number.
 @discussion In _javascript_, there is no differentiation between types of numbers.
  Semantically all numbers behave like doubles except in special cases like bit
@@ -394,25 +391,25 @@
 @property (readonly) BOOL isNumber;
 
 /*!
-@method
+@property
 @abstract Check if a JSValue is a string.
 */
 @property (readonly) BOOL isString;
 
 /*!
-@method
+@property
 @abstract Check if a JSValue is an object.
 */
 @property (readonly) BOOL isObject;
 
 /*!
-@method
+@property
 @abstract Check if a JSValue is an array.
 */ 
 @property (readonly) BOOL isArray NS_AVAILABLE(10_11, 9_0);
 
 /*!
-@method
+@property
 @abstract Check if a JSValue is a date.
 */ 
 @property (readonly) BOOL isDate NS_AVAILABLE(10_11, 9_0);
@@ -592,8 +589,6 @@
 /*!
 @method
 @abstract Creates a JSValue, wrapping its C API counterpart.
-@param value
-@param context
 @result The Objective-C API equivalent of the specified JSValueRef.
 */
 + (JSValue *)valueWithJSValueRef:(JSValueRef)value inContext:(JSContext *)context;

Modified: trunk/Source/_javascript_Core/API/JSValueRef.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSValueRef.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSValueRef.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -93,7 +93,7 @@
 @param value    The JSValue whose type you want to obtain.
 @result         A value of type JSType that identifies value's type.
 */
-JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef);
+JS_EXPORT JSType JSValueGetType(JSContextRef ctx, JSValueRef value);
 
 /*!
 @function

Modified: trunk/Source/_javascript_Core/API/JSWeakObjectMapRefPrivate.h (207541 => 207542)


--- trunk/Source/_javascript_Core/API/JSWeakObjectMapRefPrivate.h	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/API/JSWeakObjectMapRefPrivate.h	2016-10-19 17:18:27 UTC (rev 207542)
@@ -64,7 +64,7 @@
  @param key The key to associate a weak reference with.
  @param object The user defined object to associate with the key.
  */
-JS_EXPORT void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef);
+JS_EXPORT void JSWeakObjectMapSet(JSContextRef ctx, JSWeakObjectMapRef map, void* key, JSObjectRef object);
 
 /*!
  @function

Modified: trunk/Source/_javascript_Core/ChangeLog (207541 => 207542)


--- trunk/Source/_javascript_Core/ChangeLog	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-19 17:18:27 UTC (rev 207542)
@@ -1,3 +1,29 @@
+2016-10-19  Dan Bernstein  <m...@apple.com>
+
+        [Xcode] _javascript_Core fails to build when CLANG_WARN_DOCUMENTATION_COMMENTS is enabled
+        https://bugs.webkit.org/show_bug.cgi?id=163642
+
+        Reviewed by Darin Adler.
+
+        * API/JSClassRef.cpp: Removed a bad headerdoc comment inside an implementation file.
+        * API/JSContext.h: Changed @methodgroup to @functiongroup, because the compiler requires the
+          former to be followed by a method (and we have a property), but not the latter. Changed
+          a couple of instances of “method” to “@method”. Removed empty @param entries.
+        * API/JSContextRefInternal.h: Named a parameter referenced in a @param entry.
+        * API/JSContextRefPrivate.h: Ditto.
+        * API/JSManagedValue.h: Removed empty @param entries.
+        * API/JSObjectRef.h: Corrected parameter name in @param entry.
+        * API/JSTypedArray.h: Ditto.
+        * API/JSValue.h: Removed empty @param entries, changed @methodgroup to @functiongroup, and
+          changed @method to @property where appropriate. Removed empty @param entries.
+        * API/JSValueRef.h: Named a parameter referenced in a @param entry.
+        * API/JSWeakObjectMapRefPrivate.h: Ditto.
+        * Configurations/Base.xcconfig: Enabled CLANG_WARN_DOCUMENTATION_COMMENTS. Made the compiler
+          treat the icu headers as system headers, to stop it from emitting warnings about headers
+          we don’t want to change.
+        * Configurations/ToolExecutable.xcconfig: Made the compiler treat the icu headers as system
+          headers.
+
 2016-10-19  Csaba Osztrogonác  <o...@webkit.org>
 
         Unreviewed ARM buildfix after r207475.

Modified: trunk/Source/_javascript_Core/Configurations/Base.xcconfig (207541 => 207542)


--- trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/Configurations/Base.xcconfig	2016-10-19 17:18:27 UTC (rev 207542)
@@ -77,6 +77,7 @@
 GCC_WARN_UNINITIALIZED_AUTOS = YES;
 GCC_WARN_UNUSED_FUNCTION = YES;
 GCC_WARN_UNUSED_VARIABLE = YES;
+CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 PREBINDING = NO;
 WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough;
 
@@ -86,7 +87,7 @@
 LLVM_SYSTEM_HEADER_PATH[sdk=macosx*] = /usr/local/LLVMForJavaScriptCore/include;
 LLVM_SYSTEM_HEADER_PATH[sdk=iphoneos*] = /usr/local/include;
 
-HEADER_SEARCH_PATHS = . icu $(LLVM_LOCAL_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/ExtraIncludesForLocalLLVMBuild" $(LLVM_SYSTEM_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
+HEADER_SEARCH_PATHS = . $(LLVM_LOCAL_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/ExtraIncludesForLocalLLVMBuild" $(LLVM_SYSTEM_HEADER_PATH) "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
 
 TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
 TARGET_MAC_OS_X_VERSION_MAJOR_10 = 101000;
@@ -137,8 +138,8 @@
 
 SDKROOT = macosx.internal;
 
-OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
-OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS) -isystem icu;
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS) -isystem icu;
 OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
 
 WK_EMPTY_ = YES;

Modified: trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig (207541 => 207542)


--- trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig	2016-10-19 16:57:31 UTC (rev 207541)
+++ trunk/Source/_javascript_Core/Configurations/ToolExecutable.xcconfig	2016-10-19 17:18:27 UTC (rev 207542)
@@ -47,8 +47,8 @@
 CLANG_ENABLE_OBJC_ARC_armv7s = YES;
 CLANG_ENABLE_OBJC_ARC_arm64 = YES;
 
-OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
-OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS) -isystem icu;
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS) -isystem icu;
 OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
 
 // Explicitly add the PrivateHeaders directory to the search path so that generated header files can be found in production builds.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to