     ;; against, can't use cr-flymake-chromium-src here.  Instead we add a
     ;; generic regexp, but only to a buffer-local version of the variable.
     (set (make-local-variable 'flymake-allowed-file-name-masks)
-         (list (list (concat "\\." (make-regexp '("c" "cc" "cpp")) "$")
+         (list (list "\\.c\\(\\|c\\|pp\\)"
                      'cr-flymake-ninja-command-line
-                     nil
+                     'ignore
                      'cr-flymake-getfname)))
     (flymake-find-file-hook)
     (if flymake-mode


(defun cr-flymake-getfname (file-name-from-error-message)
  "Strip cruft from the passed-in filename to help flymake find the real file."
  (concat (cr-flymake-chromium-src)
          (substring file-name-from-error-message
                     (length (cr-flymake-from-build-to-src-root)))))

(defun cr-flymake-ninja-command-line ()
  "Return the command-line for running ninja, as a list of strings, or nil if

  "Return chromium's src/ directory, or nil on failure."
  (locate-dominating-file buffer-file-truename cr-flymake-ninja-build-file))

(defun cr-flymake-string-prefix-p (prefix str)
  "Return non-nil if PREFIX is a prefix of STR (23.2 has string-prefix-p but
  that's case insensitive and also 23.1 doesn't have it)."
  (string= prefix (substring str 0 (length prefix))))

(defun cr-flymake-current-file-name ()
  "Return the relative path from chromium's src/ directory to the
  file backing the current buffer or nil if it doesn't look like
  we're under chromium/src/."
  (when (and (cr-flymake-chromium-src)
             (cr-flymake-string-prefix-p
              (cr-flymake-chromium-src) buffer-file-truename))
    (substring buffer-file-truename (length (cr-flymake-chromium-src)))))

(defun cr-flymake-from-build-to-src-root ()
